Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove ripple effect from RadioButton, android?

Tags:

android

I have custom styled a RadioButton for adding radiobutton image on the right side

<RadioButton
                android:layout_margin="20dp"
                android:drawableRight="@drawable/custom_btn_radio"
                android:button="@null"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Invite Only"/> 

custom_btn_radio.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/check_box" android:state_checked="false"/>
    <item android:drawable="@drawable/close_btn" android:state_checked="true"/>
</selector>

but, the radiobutton's ripple effect also enlarged. how can i remove ripple effect from RadioButton? and also how to customize ripple effect?

Thank you in advance.

like image 409
Riyas PK Avatar asked Mar 04 '16 10:03

Riyas PK


People also ask

How do I turn off Touch effects on android?

Open Settings . Scroll down and select Accessibility. Scroll down to Display and tap Text and display. Tap the toggle switch for Remove animations to turn it on.


1 Answers

Make RadioButton background to transparent

android:background="#ffffffff"

or

android:background="@android:color/transparent"
like image 127
Riyas PK Avatar answered Sep 18 '22 17:09

Riyas PK