1.当页面中有多个EditText时,第一个EditText会自动获取焦点,取消的办法:
在EditText的父View中调用:
android:focusable="true"
android:focusableInTouchMode="true"
eg:
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:focusable="true" android:focusableInTouchMode="true"> <EditText android:id="@+id/edittext" android:layout_width="match_parent" android:layout_height="match_parent" android:hint="edittext"/> </LinearLayout>