how to put the text on the left of a radio button in android
2016-11-18 22:08
573 查看
http://stackoverflow.com/questions/18914792/how-to-put-the-text-on-the-left-of-a-radio-button-in-android Add android:gravity="right" in each RadioButton as follow.. <RadioGroup android:id="@+id/radios" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_gravity="right" android:inputType="text" android:orientation="vertical" > <RadioButton android:id="@+id/first" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="right" android:background="@color/white" android:button="@null" android:drawablePadding="30dp" android:drawableRight="@android:drawable/btn_radio" android:text="first" android:textColor="@color/Black" android:textSize="20dip" android:gravity="right"/> <RadioButton android:id="@+id/second" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/Black" android:button="@null" android:drawablePadding="30dp" android:drawableRight="@android:drawable/btn_radio" android:text="second" android:textColor="@color/White" android:textSize="20dp" android:gravity="right"/> <RadioButton android:id="@+id/third" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/Maroon" android:button="@null" android:drawablePadding="30dp" android:drawableRight="@android:drawable/btn_radio" android:text="third" android:textColor="@color/Vanilla" android:textSize="20dp" android:gravity="right" /></RadioGroup>
http://stackoverflow.com/questions/18914792/how-to-put-the-text-on-the-left-of-a-radio-button-in-android
相关文章推荐
- How to alignment the center position of the button in Android?
- How to change the Text color of Menu item in Android?
- [Android 問題] How to Add a Button in ListView, and Make the Event of onClick and onItemClick Coexist?
- How to count the number of threads in a process on Linux
- [WP7] How to press the mouse on a control, and detect MouseLeftButtonUp on another
- How to allow a user to click on TextBlocks which return an integer ID in the click handler
- How to change the text color on UINavigationBar button items
- how to calculate the textsize of TLatex in CernRoot
- How to get the value of a form element : check box and radio button
- How to Control the [Add document] button on the bottom of every view?
- How to change the size of the button of an android checkbox?
- how to translate the text of push button
- How to set the DefaultButton in a Page Based on ASP.NET Master Page
- how to translate the text of push button
- How to put an object on the request in a servlet
- How to handle the MouseLeftButtonDown and MouseLeftButtonUp events of the Button control?
- In Android how to display one view as overlay on top of another view?
- Tips on how to Fix People Problems Appearing in the Business of Mining Machinery?
- How to change the text color of the selected property sheet tab in Visual C++
- How to get the data from a cell when I click on the GridButtonColumn of the same row