I tried to make the RTL radio -Put radio station with the right mouse button for Android with AppCompactRadioButton, and I achieved this with android:drawableRight and set android:button="@null" , so my final view is what I wanted, and final code: / p>
<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 my question is how to change the central position of the ripple effect, because I set the button to zero, the center of action of the ripple effect is in the center of the radio button, as shown above, and it is not expected from the user to see the ripple there. I tried setting layout_direction to RTL but nothing is fixed.
I should mention that I also tried to fix this problem with ripples as shown below, but nothing has changed and the problem is 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>
In short, is there any idea to change the center position of the Ripple effect effect for the android Appcompat button?
source share