安卓edittext输入法控制

一、Android EditText默认不弹出输入法的办法:

  1. 在AndroidManifest.xml中将需要默认隐藏键盘的Activity中添加属性即可(常用此方法)
    android:windowSoftInputMode=“adjustUnspecified|stateHidden”
    android:configChanges=“orientation|keyboardHidden”
    例如:

    禁止输入法出现后,背景布局上移
    android:windowSoftInputMode=“stateAlwaysHidden|adjustPan”/>
发布了46 篇原创文章 · 获赞 12 · 访问量 1591

猜你喜欢

转载自blog.csdn.net/weixin_43605701/article/details/103233129