In an Activity say MainActivity, i have programatically added a Fragment say Fragment_1
This Fragment_1 has a layout which contains an EditText. When i start showing this Fragment_1, the EditText gets focused but the soft keyboard is not openned
So i click on the EditText to open the keyboard, type some text and click done button, which must replace Fragment_1 with Fragment_2 which also contains an EditText.
But this EditText in Fragment_2 is not focused, but the keyboard is still open (may be because of the last Fragment_1)
so i added this for Fragment_2
EditText.requestFocus();
the focus is there and the keyboard is open, but the EditText is not getting populated by the Key Characters i am clicking.
Why is it so??
Thank You.
You should hide keyboard for first edit text on first fragment
and than you should request focus and show keyboard for second edit text: