radio button - Android RadioButton icon disappears when singleline set to true and text gravity set to right -
i found weird situation on android radiobutton, when set singleline true , setgravity right, radio icon disappears. know causes problem , how make shows icon while setting singleline true , gravity right? xml file:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <radiobutton android:id="@+id/radio1" android:layout_width="fill_parent" android:layout_height="40dp" android:clickable="false" android:focusable="false" android:focusableintouchmode="false" android:gravity="right|center_vertical" android:background="#ff0000" android:text="hello" android:singleline="true" /> <radiobutton android:id="@+id/radio2" android:layout_width="fill_parent" android:layout_height="40dp" android:clickable="false" android:focusable="false" android:focusableintouchmode="false" android:gravity="right|center_vertical" android:background="#00ff00" android:text="hello2" /> </linearlayout>
and here looks like:
notice first radiobutton, icon gone.
Comments
Post a Comment