从自动请求焦点的Andr​​oid prevent的EditText [英] android prevent EditText from requesting focus automatically

查看:132
本文介绍了从自动请求焦点的Andr​​oid prevent的EditText的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的布局有一个EditText和一个按钮。问题是,该活动已经启动,而EditText上获得焦点后键盘会出现。我删除了< / requestFocus的> 从XML和我也没有做,在code。我怎样才能prevent EditText上的这种行为使键盘仅出现在使用水龙头EDITTEXT后?

解决方案

 安卓windowSoftInputMode =stateHidden
 

I have a quite simple Layout with an EditText and a button. The problem is the keyboard appears immediately after the activity is started and the EditText gets the focus. I removed the </requestFocus> from XML and I also don't do that in code. How can I prevent that behavior of EditText so the keyboard only appears after the used taps the editText?

解决方案

android:windowSoftInputMode="stateHidden"

这篇关于从自动请求焦点的Andr​​oid prevent的EditText的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆