Linerlayout background selector无效解决方法
来源:互联网 发布:淘宝交易数据 编辑:程序博客网 时间:2024/05/21 07:58
Linerlayout xml属性:
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_white_to_gray" android:orientation="horizontal">
selector xml属性:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/colorAccent" android:state_pressed="true"/> <item android:drawable="@color/colorPrimary"/> </selector>
发现并没有什么卵用
需要在Linerlayout xml属性加上一句
android:clickable="true"
0 0
- Linerlayout background selector无效解决方法
- selector无效
- selector android:state_enabled 无效
- selector android:state_enabled 无效
- android 设置selector无效
- Android背景Selector无效
- TextView设置selector无效
- ListView设置selector无效
- 自定义View selector无效
- Android 设置background(seletor)无效
- js中background-position 无效
- Background 导致 Padding 无效解析
- background 全屏解决方法
- android selector android:state_enabled 无效
- Android drawable selector 设置无效
- selector.xml中状态无效
- selector.xml无效的解决办法
- Android selector shape 无效问题
- C++中getline函数
- 001-Cocos2dx-2.1.3环境搭建-windows
- HDU 4930 斗地主模拟
- Android Studio中的.gradle文件解读
- 常用正则表达式
- Linerlayout background selector无效解决方法
- sprintf()函数的用法
- NOIP 2012 Vigenère 密码
- 血的教训:程序编译出错 crashed崩溃
- 【个人喜好诗词之一】滕王阁序
- 多线程同步问题(1)互斥锁和条件变量
- ansible之并发运行
- DIV半透明层 CSS来实现网页背景半透明
- 电脑眼保健操——设置护眼色