Showing softkeyboard on change in focus edittext android
<p>I am using the follwing code to show a keyboard of an edit box when the focus is changed.</p>

<pre><code>  no1.setOnKeyListener(new OnKeyListener() {
        public boolean onKey(View v, int keyCode, KeyEvent event) {
            if (event.getAction() == KeyEvent.ACTION_DOWN)
            {
            if(keyCode == 66) {

                no2.requestFocus();

            }
            }
            return false;
        }
    });


    no2.setOnKeyListener(new OnKeyListener() {
        public boolean onKey(View v, int keyCode, KeyEvent event) {
            if (event.getAction() == KeyEvent.ACTION_DOWN)
            {
            if(keyCode == 66) {
                 //Log.e("I am inside no2","no2");
                no3.requestFocus();

                return true;


            }
            }
            return false;
        }
    });



    no2.setOnFocusChangeListener(new View.OnFocusChangeListener() {
        public void onFocusChange(View v, boolean hasFocus) {
            if (hasFocus) {
               Log.e("In","Innnnnn");
               InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
                imm.showSoftInput(no2, InputMethodManager.SHOW_IMPLICIT);         
            }
        }
    });
</code></pre>

<p>However the keyboard does not show. The log statement is being printed. So that means it is entering the focusChanged method. Any ideas what I am doing wrong?</p>
