Change android Ripple effect center position for android Appcompat radio button -
i tried make rtl radio -put radio on right side- button android appcompactradiobutton, , achieved android:drawableright
, set android:button="@null"
final view wanted , final code this:
<android.support.v7.widget.appcompatradiobutton android:id="@+id/radio_man" style="@style/app_font" android:layout_width="0dp" android:layout_height="@dimen/edit_text_height" android:layout_weight="1" android:button="@null" android:drawableright="@drawable/form_radiobutton" android:minheight="33dp" android:onclick="onsexradiobuttonclicked" android:text="@string/hint_man" />
but question how to change ripple effect center position, because set button null, ripple effect center poisiton in center of radio button image above , not expected user see ripple there. tried set layout_direction rtl, nothing fixed.
i have mention tried fix problem ripple drawable below nothing changed , problem still there.
<?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@android:color/transparent"> <item> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/btn_radio_activated" android:state_checked="true" /> <item android:drawable="@drawable/btn_radio_deactive" /> </selector> </item> </ripple>
long story short, there idea change android ripple effect center position android appcompat radio button?
i can succesfully erase ripple effect changing background of radiobutton transparent this:
android:background="@android:color/transparent"
i didn't yet tried guess can set drawable left padding overcome problem.
Comments
Post a Comment