android学习之EditText需要点击两次触发onclick问题解决
2016-03-06 15:39
609 查看
Unlike most other controls,
EditTexts are focusable while the system is in ‘touch mode’. The first click event focuses the control, while the second click event actually fires the
OnClickListener. If you disable touch-mode focus with the
android:focusableInTouchModeView attribute, the
OnClickListener should fire as expected.
<EditText android:text="@+id/EditText01" android:id="@+id/EditText01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusableInTouchMode="false" />
相关文章推荐
- Android之路-学习-手机卫士
- android简单实例---------ActionBar的简单使用(一)
- Android开发60条技术经验总结
- 《Android群英传》 使用Canvas绘图
- Android开发艺术探索读后感-part1
- Android菜鸟的成长笔记——PopupMenu使用
- android studio 开发 proxy 异常
- android中使用codec总是报NoSuchMethodError的问题根源
- <Android编程权威指南>之1.6 Activity.this和this的区别
- 我的Android进阶之旅------>Android自定义View来实现解析lrc歌词并同步滚动、上下拖动、缩放歌词的功能
- 猜猜红桃A在哪里(ImageView单击事件与透明度处理)
- android开发中是用Intent从一个activity跳向一个activity的问题
- Android Studio中mergeDebugResources时报“png-cruncher_*”异常死机的解决方案
- Android中Canvas画图
- Android入门开发报错通用自查列表
- Android四大组件之一广播
- android应用使用情况统计实现
- Android 6.0 RunTimePermission(运行时授权)
- Android开发问题汇总–持续更新
- Android常用开发工具、站点集合