Android 设置让EditText不自动获取焦点
16lz
2021-01-23
在EditText所在的父控件中设置如下属性:
android:focusable="true" android:focusableInTouchMode="true"
例如:
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:focusable="true" android:focusableInTouchMode="true"> <com.wzh.view.ClearEditText android:layout_marginTop="5dp" android:id="@+id/etBqyshwjlw" style="@style/cetStyle" android:maxLength="12" android:hint="本期应税货物及劳务"/> <com.wzh.view.ClearEditText android:layout_marginTop="5dp" android:id="@+id/etBqysfw" style="@style/cetStyle" android:maxLength="12" android:hint="本期应税服务"/> <com.wzh.view.ClearEditText android:layout_marginTop="5dp" android:id="@+id/etBnyshwjlw" style="@style/cetStyle" android:maxLength="12" android:hint="本年累计应税货物及劳务"/> <com.wzh.view.ClearEditText android:layout_marginTop="5dp" android:id="@+id/etBnysfw" style="@style/cetStyle" android:maxLength="12" android:hint="本年累计应税服务"/> </LinearLayout>
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer