我有一个Android活动,整个布局中只有一个 EditText 。出于某种原因,每当活动开始时,键盘就会弹出。
我已经尝试了所有以下事项:
Placing these two in OnStart
:
FindViewById<EditText> (Resource.Id.searchText).ClearFocus ();
FindViewById<EditText> (Resource.Id.searchText).Selected = false;
Adding a LinearLayout
with these two properties:
android:focusable="true" android:focusableInTouchMode="true"
Adding the following tag inside another View
on the layout:
android:focusable="true" android:focusableInTouchMode="true"
Adding this to my activity manifest:
android:windowSoftInputMode="stateHidden"
但是,当活动打开时,键盘仍然会弹出。我可能做错了什么?