个人成功试验结果:

为Button或者EditText加上一个布局;

<RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:descendantFocusability="blocksDescendants"><Buttonandroid:id="@+id/attention_btn"android:layout_width="wrap_content"android:layout_height="wrap_content"android:background="@drawable/btn_attention_normal"android:layout_alignParentRight="true"android:focusable="false"/></RelativeLayout>

其中两个重要的属性:

RelativeLayout:android:descendantFocusability="blocksDescendants"

Button:android:focusable="false"

更多相关文章

  1. gradle 配置文件 build.gradle 属性详解
  2. android布局属性详解
  3. android全屏设置代码
  4. andriod item内checked的setOnClickListener事件和setOnItemClic
  5. 如何让Android横竖屏切换时不销毁当前activity
  6. android configChanges
  7. android中自定义进度条风格
  8. AndroidManifest.xml 中application 的 android:name 属性作用
  9. Android键盘属性

随机推荐

  1. Android(安卓)字符串应用浅析
  2. Android学习笔记——xml布局属性
  3. Android(安卓)使用SQLCipher对sqlite进行
  4. Android的Widget编写实例
  5. 构建Android自适应布局应用方案解析
  6. Android(安卓)6.0权限请求相关及权限分组
  7. 关于Android(安卓)Studio里的Gradle,你所
  8. Android(安卓)学习笔记 - 《第一行代码 A
  9. Android开发实战之——ProgressDialog的
  10. Android不明原因崩溃,不断重启解决办法记