android EditText默认问题
2015-07-17 15:27
211 查看
取消EditText默认行为
在android中,进入一个页面后 EditText就会默认自动获取焦点。
取消方法:
在EditText的父级控件中设置:android:focusable="true" android:focusableInTouchMode="true"
如:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" android:focusableInTouchMode="true"> <EditText android:id="@+id/editext" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout>
这样以后每次点击进入页面就看不到editext弹出那烦人的编辑页面啦
相关文章推荐
- Android Studio 上如何使用LogCat
- 完全自定义Android对话框AlertDialog的实现(系统源码)
- min3d引擎使用指南(Android)<二>
- android studio 之BaseAdapter
- android getContentLength()函数返回为-1的问题
- apk打包之用纯命令行打包apk(android4.4亲测可用)
- 关于AndroidStudio引用外部库时的问题(gradle构建机理)
- Android 性能分析工具dumpsys的使用
- Android给定坐标计算距离
- android之事件
- Android调用系统摄像头拍照并剪裁压缩
- MiniTwitter记住密码等功能实现
- Android 自定义 ViewPager 打造千变万化的图片切换效果
- 图解Android View的scrollTo(),scrollBy(),getScrollX(), getScrollY()
- android资源收藏
- Android反射打造万能SharedPreferences
- Android直接拿来用!最火的Android开源项目(完结篇)
- Android fragment 获取id,findViewById为空
- Android直接拿来用!最火的Android开源项目(二)
- 学习Android百分百布局库