android 为textView设置selector
来源:互联网 发布:网络打印机监控软件 编辑:程序博客网 时间:2024/05/04 08:23
资源文件:
selector_text_white_gray.xml
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:color="@color/gray_color_2"></item> <item android:state_pressed="false" android:color="@color/white"></item></selector>
为textView设置属性
<TextView android:id="@+id/tv_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:clickable="true" android:textSize="@dimen/font_size2" android:textColor="@drawable/selector_text_white_gray" />
这样就行了
0 0
- android 为textView设置selector
- Textview 设置selector
- TextView设置selector无效
- Android设置TextView的Selector来控制点击的颜色
- Android设置TextView的Selector来控制点击的颜色
- Android设置TextView的Selector来控制点击的颜色
- Android设置TextView的Selector来控制点击的颜色
- Android设置TextView的Selector来控制点击的颜色
- android textView 技巧 富文本显示 代码设置selector
- Android设置TextView的Selector来控制点击的颜色
- Android 设置TextView字体Color Selector的正确方式
- Android设置TextView的Selector来控制点击的颜色
- TextView 使用Selector设置颜色
- Android 使用代码为textview设置drawableLeft
- Android使用代码为textview设置drawableLeft
- Android中为ViewGroup设置selector无效果
- Android View设置背景为selector的注意事项
- TextView设置selector后,没有点击效果
- android listview每个item定义动画呈现
- Vim实战指南(五):文本替换
- CF #614A(查找指定范围内的幂乘数)
- 在centos上安装最新版supervisord后台服务
- iOS本地化语言
- android 为textView设置selector
- Gradle Dsl method not found:'android()'
- 数据结构学习之队列
- 谨以此纪念即将诞生的《江湖X》
- 【java学习笔记】java中的中间缓存变量机制
- cocos2dx Action 动作
- 使用BootstrapValidator实现表单验证
- OpenCV实践之路——Hough变换检测猫眼
- 继承view要用AppCompatXXX