Can not open soft keyboard in EditText control
<p>I want to create 1 edit text with the below condition:
- User can not focus on this control in normal.
- When user click on this control, soft-keyborad is displayed and user can input into this control
- When user press enter on this soft-keyborad or back on device, it is closed and back to normal view with control is not focus.</p>

<p>I tried the below code but not work :(
When starting, control is not focus: ok</p>

<p>When click on control, at the first click, control is focus but not display soft-keyborad</p>

<p>In the second click, display soft-keyborad</p>

<ul>
<li>When press enter button in soft-keyborad: back to screen with control is not focus: OK</li>
<li><p>When press back button device, back to screen with control is still focus : not ok</p>

<pre><code>public void onCreate(Bundle savedInstanceState)
{
final EditText txtSearch = (EditText)this.findViewById(R.id.p60004_txt_search_str);
txtSearch.setOnClickListener(new OnClickListener() {

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        txtSearch.setFocusable(true);//(false);
        txtSearch.setFocusableInTouchMode(true);
        txtSearch.requestFocus();
    }
});
txtSearch.setOnKeyListener(new OnKeyListener() {

    @Override
    public boolean onKey(View v, int keyCode, KeyEvent event) {
        // TODO Auto-generated method stub
        if ((event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp;
                (keyCode == KeyEvent.KEYCODE_ENTER))
            {
                String strSearch = txtSearch.getText().toString();
                if (strSearch != null &amp;&amp; strSearch != ""){
                        searchFriend(UserAPIConstants.FRIEND_SEARCH_TYPE_SC, strSearch);
                }

                hideSoftKeyboard(v);
                txtSearch.setFocusable(false);
                txtSearch.setFocusableInTouchMode(false);

            }

        return false;
    }
});
public void hideSoftKeyboard (View view) {
  InputMethodManager imm = (InputMethodManager)this.getSystemService(Context.INPUT_METHOD_SERVICE);
  imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
</code></pre></li>
</ul>
