Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
我在其他帖子上读到的同样问题。我不希望在 Activity 加载时弹出软键盘。上面的代码片段有效,但是我的视图不再向上滚动,因此用户仍然可以看到 EditText。
它在没有这行代码的情况下滚动。有任何想法吗?
在清单http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft中为您的活动设置正确的属性