In the development, often encounter this situation, open an activity, the first text box automatically get focus, and will pop up the soft keyboard input box, which greatly affect the user experience, now look at the solution.
Let's see why this is the case, the reason is very simple, the text box will be the focus of the default, after the focus will continue to pop up the input box, waiting for input, for this reason, we can have the following two scenarios:
1, do not let the text box to get focus;
2, get the focus does not pop up the input box;
To see the first method, we can preempt the focus of a text box, such as joining in its parent form:
1<LinearLayout2Xmlns:android="http://schemas.android.com/apk/res/android"3xmlns:tools="Http://schemas.android.com/tools"4Android:layout_width="match_parent"5android:layout_height="match_parent"6android:focusable="true"7Android:focusableintouchmode="true"8android:orientation="Vertical"9tools:context=". Mainactivity">Ten One<EditText AAndroid:id="@+id/etmsg" -Android:layout_width="wrap_content" -android:layout_height="wrap_content"/> the</LinearLayout>
Look at the second method, add in the activity:
1 " Statehidden "
Reference
http://my.oschina.net/helu/blog/142020
Android Launcher activity text box does not get focus