android 设置selector无效
来源:互联网 发布:阿里巴巴有淘宝客吗 编辑:程序博客网 时间:2024/05/17 22:56
这个是要点击的图片资源
<ImageView android:id="@+id/add" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/add_selector" android:layout_centerHorizontal="true"android:layout_marginTop="49dp"/>
这个为 add_selector.xml
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/add_pressed" /> <item android:state_focused="true" android:drawable="@drawable/add_unpressed" /> <item android:drawable="@drawable/add_unpressed" /></selector>单纯的这样是无效的,要在代码中添加 add的点击事件
ImageView add = (ImageView) findViewById(R.id.add);dd.setOnClickListener(this);
0 0
- android 设置selector无效
- Android drawable selector 设置无效
- selector android:state_enabled或者state_pressed设置无效
- TextView设置selector无效
- ListView设置selector无效
- selector android:state_enabled 无效
- selector android:state_enabled 无效
- Android背景Selector无效
- Android 使用selector设置button字体颜色无效
- android selector android:state_enabled 无效
- Android selector shape 无效问题
- 安卓selector设置无效的情况
- 给View设置selector无效的解决办法。
- selector无效
- android使用selector在 button上无效
- [置顶] Android selector设置详解
- Android之代码设置selector
- android 为textView设置selector
- eclipse 一直loading org.hibernate.eclipse解决方法
- JS检测用户输入密码强度代码
- iOS开发项目中常用到的一些宏
- 安卓日记——preference用法简介
- 博客开通,AnyCai
- android 设置selector无效
- 【好书推荐】机器学习书单
- 用Hibernate实现领域对象的自定义字段
- Android 开发小TIPS
- SVN-服务器及pc端SVN搭建
- Windows Message Queue(杭电oj1509)(优先队列)
- js控制div显示隐藏
- 记录自己编译android源代码的全过程
- 我要学习了