I have problem with RadioButton
ripple effect. I want get this: I have ripple in full background of list item
but I have this: I have ripple only around mark
How can I implement this?
I have problem with RadioButton
ripple effect. I want get this: I have ripple in full background of list item
but I have this: I have ripple only around mark
How can I implement this?
Apply click listener on itemView and in that listener check radio button as true or false. Change the backgroundTint to required color of radio button.
Ripple effect is available for API-level 21+ you can apply it to Radio buttons with
android:background="?android:attr/selectableItemBackground"
for each individual button
<RadioGroup
android:id="@+id/radiogroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:text="Option number one" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:text="Option number two" />
</RadioGroup>