How to Stop EditText from gaining focus at Activity startup ?
You may noticed that, When an activity with EditText field starts, the EditText immediately has input focus and shows the keyboard. We can fix it by adding two attributes to the parent layout.
And now when activity starts this layout getting default focus. No more EditText focus problem.
android:descendantFocusability="beforeDescendants" android:focusableInTouchMode="true"
And now when activity starts this layout getting default focus. No more EditText focus problem.
0 comments: