在打开带有EditText控件的android程序时会自动弹出键盘提示输入,下面代码可禁止自动弹出,需在AndroidManifest.xml中添加。

找到EditText的父级控制加入:

    android:focusable="true" 
    android:focusableInTouchMode="true 

然后去掉EditText布局中原有的:

    <requestFocus />

 

相关文章:

  • 2021-08-01
  • 2022-12-23
  • 2021-10-28
  • 2021-11-28
  • 2021-05-26
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案