Closed shokri-navid closed 7 years ago
For the built-in CircularToggle
and LabelToggle
, you can use the tbgMarkerColor
attribute to change the color of the marker.
For example, add app:tbgMarkerColor="@android:color/holo_red_light"
to every CircularToggle
in the demo layout activity_single_select.xml:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
...>
<com.nex3z.togglebuttongroup.SingleSelectToggleGroup
android:id="@+id/group_choices"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tbgCheckedButton="@+id/choice_a">
<com.nex3z.togglebuttongroup.button.CircularToggle
android:id="@+id/choice_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="A"
app:tbgMarkerColor="@android:color/holo_red_light"/>
...
</com.nex3z.togglebuttongroup.SingleSelectToggleGroup>
</LinearLayout>
This will produce:
i want to change back ground of button when user check it. this has a default blue but i want to change it to my custom color? is there any method to set this property or a way to customize button.