Change what item has focus on startup. Remove focus from EditText
I have a LinearLayout and an associated Activity. In my view there is an EditText's box and a bunch of Buttons. When I start the application, focus goes imm开发者_运维知识库ediately to the EditTexts box and the soft keyboard comes up. Is there a way to avoid this so that it just comes up with nothing selected and no soft keyboard popping up? I have tried findViewById().clearFocus() and requestFocus() on different views, but nothing seems to work.
Change your Activity settings in manifest like below:
<activity
android:name=".MyActivity"
android:windowSoftInputMode="stateHidden">
</activity>
加载中,请稍侯......
精彩评论