参考资料:
https://www.cnblogs.com/dream-cichan/p/aaaa.html
http://blog.****.net/u013703461/article/details/50388395
解决方案:
在EditText的父控件中加上这两行代码即可:
android:focusable="true"
android:focusableInTouchMode="true"
如:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="54dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="horizontal" > <Spinner
android:id="@+id/spinnerWorkYear"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0"
android:visibility="invisible" /> <Spinner
android:id="@+id/spinnerLayerList"
android:layout_width="145dp"
android:layout_height="54dp" /> <EditText
android:id="@+id/txtMapQueryKeyword"
android:layout_width="185dp"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:text="0200001530122" /> <Button
android:id="@+id/btnSearch"
android:layout_width="120dp"
android:layout_height="54dp"
android:drawableLeft="@drawable/gis_search"
android:text="搜索" />
</LinearLayout>