Android中設(shè)置RadioButton在文字右邊的方法實(shí)例

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginRight="5dp"
android:layout_marginLeft="10dp">
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/rb_disable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:button="@null"
android:drawableRight="@android:drawable/btn_radio"
android:text="@string/data_romaing_disable" />
<RadioButton
android:id="@+id/rb_national_romaing_only"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:button="@null"
android:drawableRight="@android:drawable/btn_radio"
android:text="@string/data_romaing_national_romaing_only" />
<RadioButton
android:id="@+id/rb_all_network"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:button="@null"
android:drawableRight="@android:drawable/btn_radio"
android:text="@string/data_romaing_all_network" />
</RadioGroup>
</LinearLayout>
想要改變RadioButton 的位置,就先設(shè)置默認(rèn)的圖片為null ,在調(diào)用對(duì)應(yīng)的方法將圖標(biāo)放在指定的位置
- Android單選按鈕RadioButton的使用詳解
- Android控件RadioButton實(shí)現(xiàn)多選一功能
- Android開發(fā)設(shè)置RadioButton點(diǎn)擊效果的方法
- Android編程實(shí)現(xiàn)自定義PopupMenu樣式示例【顯示圖標(biāo)與設(shè)置RadioButton圖標(biāo)】
- Android RadioButton 圖片位置與大小實(shí)例詳解
- Android RadioGroup和RadioButton控件簡(jiǎn)單用法示例
- android RadioButton和CheckBox組件的使用方法
- Android RadioButton單選框的使用方法
- Android定制RadioButton樣式三種實(shí)現(xiàn)方法
- Android控件系列之RadioButton與RadioGroup使用方法
- Android控件RadioButton的使用方法
相關(guān)文章
ViewPager和SlidingPaneLayout的滑動(dòng)事件沖突解決方法
下面小編就為大家分享一篇ViewPager和SlidingPaneLayout的滑動(dòng)事件沖突解決方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2018-01-01
Android編程實(shí)現(xiàn)Dialog窗體監(jiān)聽的方法
這篇文章主要介紹了Android編程實(shí)現(xiàn)Dialog窗體監(jiān)聽的方法,結(jié)合實(shí)例形式分析了Android針對(duì)Dialog對(duì)話框窗體事件監(jiān)聽與響應(yīng)相關(guān)操作技巧,需要的朋友可以參考下2017-03-03
Android自定義可點(diǎn)擊的ImageSpan并在TextView中內(nèi)置View
這篇文章主要為大家詳細(xì)介紹了Android自定義可點(diǎn)擊的ImageSpan并在TextView中內(nèi)置"View",具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-11-11
Android 如何獲取設(shè)備唯一標(biāo)識(shí)
這篇文章主要介紹了Android 如何獲取設(shè)備唯一標(biāo)識(shí),幫助大家更好的理解和學(xué)習(xí)使用Android,感興趣的朋友可以了解下2021-03-03
Android使用內(nèi)置WebView打開TextView超鏈接的實(shí)現(xiàn)方法
這篇文章主要介紹了Android使用內(nèi)置WebView打開TextView超鏈接的實(shí)現(xiàn)方法,文中給出了詳細(xì)的示例代碼,對(duì)各位Android開發(fā)者們具有一定的參考價(jià)值,需要的朋友們下面來一起看看吧。2017-03-03
android studio2.3如何編譯動(dòng)態(tài)庫(kù)的過程詳解
這篇文章主要給大家介紹了關(guān)于android studio 2.3如何編譯動(dòng)態(tài)庫(kù)的過程,文中通過示例代碼介紹的非常詳細(xì),對(duì)各位Android開發(fā)者們具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面跟著小編來一起學(xué)習(xí)學(xué)習(xí)吧。2017-08-08

