I have an EditText and a Button. On click of the button i want to open the EditText keyboard and at the same time request focus on the
EditText
Button
In your manifest.xml write:
And call m_SearchEditText.requestfocus() in oncreate(). OR, Try:
m_SearchEditText.requestfocus()
oncreate()
if(m_SearchEditText.requestFocus()) { getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); }