title: Android EditText requestFocus
body: <p>I want to create to do items (radio button's) dynamically. So i create linear layout with horizontal orientation and push radioButton and editText to it, and i need to set focus on this EditText. I try to use method requestFocus() but in my case it doesn't work. Am I doing something wrong?</p>
  
  <pre><code>btnToDo.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  LinearLayout llNew= new LinearLayout(NewNote.this);
                  llNew.setOrientation(LinearLayout.HORIZONTAL);
                  RadioButton rbNew= new RadioButton(NewNote.this);
                  rbNew.setPadding(10,0,10,0);
  
                  //set radio button color:
                  if(Build.VERSION.SDK_INT&gt;=21)
                  {
                      ColorStateList colorStateList = new ColorStateList(
                              new int[][]{
                                      new int[]{-android.R.attr.state_enabled}, //disabled
                                      new int[]{android.R.attr.state_enabled} //enabled
                              },
                              new int[] {
                                      Color.BLACK //disabled
                                      ,Color.BLACK //enabled
                              }
                      );
                      rbNew.setButtonTintList(colorStateList);//set the color tint list
                      rbNew.invalidate(); //could not be necessary
                  }
  
                  final EditText edNew = new EditText(NewNote.this);
                  edNew.setTypeface(typefaceDunkin);
                  edNew.setTextSize(25);
                  edNew.setText("Some text");
                  edNew.setBackgroundColor(Color.WHITE);
  
                  edNew.requestFocus(); //HERE
  
                  //cross text after click on radio button
                  rbNew.setOnClickListener(new View.OnClickListener() {
                      @Override
                      public void onClick(View v) {
                          edNew.setPaintFlags(edNew.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
                      }
                  });
  
                  llNew.addView(rbNew);
                  llNew.addView(edNew);
                  content.addView(llNew);
                  scrollViewDown();
              }
          });```
  </code></pre>