RadioButton直接把backGround设置为selecter会整个背景变化,不美观!
只把边框和文字改变颜色怎么做呢
1 文字颜色直接使用textColor属性修改
2 radioButtom颜色使用buttonTint属性换色
这样就能做到原生美观的换色效果
demo:
<RadioButton android:id="@+id/rb_fence_round" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="圆形" android:checked="true" android:buttonTint="@color/white" android:textColor="@color/white" />