title: soft keyboard doesn't appear on ListView element (EditBox)
body: <p>I know this question have one million answers but nothing works for my case. I have a custom dialog that contains <code>ListView</code>, and custom elements <code>TextView</code> and <code>EditText</code>.</p>
  
  <pre><code>    public static void createDialog(Context context, Activity activity) {
      AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);
      LayoutInflater inflater = activity.getLayoutInflater();
      View convertView = inflater.inflate(R.layout.custom_simple_dialog_layout, null);
      alertDialog.setView(convertView);
  
      final ListView listView = (ListView) convertView.findViewById(R.id.dialog_listView);
  
      //myCustomObjList - contains strings for TextView and strings for EditTet hint
      ListAdapter adapter = new DialogListAdapter(context, myCustomObjList);
      listView.setAdapter(adapter);
  
      AlertDialog myAlert = alertDialog.create();
      myAlert.setCancelable(false);
      myAlert.show();
  }
  </code></pre>
  
  <p>I use BaseAdapter:</p>
  
  <pre><code>public class DialogListAdapter extends BaseAdapter {
  
      private Context context;
      private static List&lt;MyObj&gt; myCustomObjList = null;
      private static LayoutInflater inflater = null;
  
      public DialogListAdapter(Context context, List&lt;MyObj&gt; myCustomObjList) {
          this.context = context;
          this.myCustomObjList = myCustomObjList;
          inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      }
  
      @Override
      public int getCount() {
          return myCustomObjList.size();
      }
  
      @Override
      public Object getItem(int position) {
          return myCustomObjList.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  
      @Override
      public View getView(int position, View view, ViewGroup parent) {
          if (view == null)
              view = inflater.inflate(R.layout.custom_dialog_element, null);
  
  
          TextView titleTxt = (TextView) view.findViewById(R.id.dialog_element_title);
          titleTxt.setText(myCustomObjList.getTxtx());
  
          EditText elementEditTxt = (EditText) view.findViewById(R.id.dialog_edit);
          elementEditTxt.setHint(myCustomObjList.getTxtHint());
  
          return view;
      }}
  </code></pre>
  
  <p>I was trying:</p>
  
  <p>set in xml:</p>
  
  <pre><code>    &lt;EditText&gt;
      &lt;requestFocus /&gt;
  &lt;/EditText&gt;  
  </code></pre>
  
  <p>programaticaly:  </p>
  
  <pre><code>  edittext.requestFocus();
  </code></pre>
  
  <p>force SoftKeyboard to appear: </p>
  
  <pre><code> InputMethodManager mImm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);  
   mImm.showSoftInput(SearchEdit, InputMethodManager.SHOW_IMPLICIT); 
  </code></pre>
  
  <p>even</p>
  
  <pre><code>    edittext.setFocusable(true);  
  edittext.setOnFocusChangeListener(new View.OnFocusChangeListener() {  
     @Override  
     public void onFocusChange(View v, boolean hasFocus) {  
         if (hasFocus)   
             mImm.showSoftInput(SearchEdit, InputMethodManager.SHOW_IMPLICIT);  
         else  
             mImm.hideSoftInputFromWindow(edittext.getWindowToken(), 0);  
     } 
  });
  </code></pre>
  
  <p>I suppose that problem is somewhere else...</p>
  
  <p>ps original solutions <a href="https://stackoverflow.com/a/20513062/5414507">src</a></p>