Drawable 选择器 Android

<?xml version="1.0" encoding="utf-8"?>                                                                                                

Color 选择器 Android

<?xml version="1.0" encoding="utf-8"?>        

此篇文章对选择器状态进行了讲解。

去掉 RadioButton 默认的选择器 参考
XML 布局中 android:button="@null"
Java 代码 radioButton.setButtonDrawable(new StateListDrawable());
Kotlin 代码 radioButton { buttonDrawable = StateListDrawable() }

代码设置 TextView TabHost 的 Color Selector:
Java 代码 textView.setTextColor(AppCompatResources.getColorStateList(context, R.color.selector));
Kotlin 代码 radioButton { setTextColor(AppCompatResources.getColorStateList(ctx, R.color.selector)) }

更多相关文章

  1. color 颜色代码 android res/values/colors.xml
  2. Android之判断当前指定App是否在前台
  3. TimerTask抛不出运行时异常
  4. Android(安卓)TabHost的使用(一)
  5. Android(安卓)在 Fragment 中集成 React-Native(RN)步骤
  6. RecycleView 单选 以及多选单选互斥两种状态 和多选
  7. Android(安卓)DEX反编译后部分代码解析
  8. android ButterKnife 解决重复findViewById
  9. 自定义Dialog UI

随机推荐

  1. Android:Debug certificate expired on D
  2. android 状态栏透明,源码修改教程
  3. android > 调用拨打电话 并子线程监控然
  4. Android编译过程详解(一)
  5. Dealing with bitmap object in android
  6. Android控件基本属性介绍
  7. android 图片相关处理
  8. Android游戏开发学习(1)--android设置全
  9. Android(安卓)全局背景音乐
  10. Android属性设置大全