Set the listening soft keyboard event, a little call to the Clearfouse () method, but the test is not! The corresponding attribute could not be found in XML to close this default behavior
Solution: Find one in EditText's parent control, set to Android:focusable= "true" android:focusableintouchmode= "true" so that the EditText default behavior is truncated!
<LinearLayout Style= "@style/fillwrapwidgetstyle"android:orientation= "Vertical"Android:background= "@color/black"android:gravity= "Center_horizontal"android:focusable= "true"Android:focusableintouchmode= "true" > <ImageView Android:id= "@+id/logo"style= "@style/wrapcontentwidgetstyle"Android:background= "@drawable/dream_dictionary_logo"/> <relativelayout Style= "@style/fillwrapwidgetstyle"Android:background= "@drawable/searchbar_bg"android:gravity= "Center_vertical" > <EditText Android:id= "@+id/searchedittext"style= "@style/wrapcontentwidgetstyle"Android:background= "@null"Android:hint= "Search"Android:layout_marginleft= "40DP"Android:singleline= "true"/> </RelativeLayout> </LinearLayout>
Reference Original: http://blog.csdn.net/chenshijun0101/article/details/20362483
How Android lets EditText not automatically get focus