android - edittext 默认隐藏软键盘
16lz
2021-12-09
edittext 默认隐藏软键盘
方法一:
在 edittext 最外层的布局加入下面两句:
android:focusable="true"
android:focusableInTouchMode="true"
代码如下:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="horizontal" >
<EditText
android:id="@id/edit_news_gathering_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:hint="@string/newsGatheringTitle"
android:inputType="text" />
</LinearLayout>
属于别人使用的方法,几天后整理,搜不到原引用了,抱歉。
更多相关文章
- Android(安卓)Bundle类
- Android中两种设置全屏的方法
- android弹出软键盘时,editText被遮挡一部分,五分之一左右的问题
- 十七、Android学习笔记_Android(安卓)使用 搜索框
- Android(安卓)4.0.3 源码编译中添加外部jar包和外部so到apk的方
- Android(安卓)编程下 Touch 事件的分发和消费机制
- Android四大基本组件介绍与生命周期
- 浅谈Java中Collections.sort对List排序的两种方法
- Python list sort方法的具体使用