[英]Android Keyboard automatically appears for EditText when activity is created
I have a single activity class and it has a two EditTexts on the screen. 我有一个活动类,它在屏幕上有两个EditTexts。 When the activity launches the keyboard launches with it.
活动启动时,键盘随之启动。 Why is this?
为什么是这样? I did not request enter anything yet into the edit box.
我没有要求在编辑框中输入任何内容。 Why does it do this?
为什么这样做? And how can I get rid of this behavior?
而我该如何摆脱这种行为呢?
Try setting your stateHidden in the manifest file for the activity: 尝试在清单文件中为活动设置stateHidden:
http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft
and this might be helpful: 这可能会有所帮助:
How to keep soft keyboard from opening on activity launch in Android? 如何在Android中的活动启动时保持软键盘打开?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.