forum

Home / DeveloperSection / Forums / Stop EditText from gaining focus at Activity startup

Stop EditText from gaining focus at Activity startup

Samuel Fernandes201123-Apr-2015
I have an Android Activity, with two elements:

1.EditText
2.ListView

When my Activity starts, the EditText immediately has input focus (flashing cursor). I don't want any control to have input focus at startup. I tried:

EditText.setSelected(false);

No luck. How can I convince the EditText to not select itself when the Activity starts?

Updated on 23-Apr-2015

Can you answer this question?


Answer

1 Answers

Liked By