Android中設(shè)置RadioButton在文字右邊的方法實例
更新時間:2015年04月24日 10:16:20 投稿:junjie
這篇文章主要介紹了Android中設(shè)置RadioButton在文字右邊的方法實例,本文直接給出XML配置實現(xiàn)代碼,需要的朋友可以參考下
<?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)用對應(yīng)的方法將圖標(biāo)放在指定的位置
您可能感興趣的文章:
- Android單選按鈕RadioButton的使用詳解
- Android控件RadioButton實現(xiàn)多選一功能
- Android開發(fā)設(shè)置RadioButton點擊效果的方法
- Android編程實現(xiàn)自定義PopupMenu樣式示例【顯示圖標(biāo)與設(shè)置RadioButton圖標(biāo)】
- Android RadioButton 圖片位置與大小實例詳解
- Android RadioGroup和RadioButton控件簡單用法示例
- android RadioButton和CheckBox組件的使用方法
- Android RadioButton單選框的使用方法
- Android定制RadioButton樣式三種實現(xiàn)方法
- Android控件系列之RadioButton與RadioGroup使用方法
- Android控件RadioButton的使用方法
相關(guān)文章
ViewPager和SlidingPaneLayout的滑動事件沖突解決方法
下面小編就為大家分享一篇ViewPager和SlidingPaneLayout的滑動事件沖突解決方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-01-01Android編程實現(xiàn)Dialog窗體監(jiān)聽的方法
這篇文章主要介紹了Android編程實現(xiàn)Dialog窗體監(jiān)聽的方法,結(jié)合實例形式分析了Android針對Dialog對話框窗體事件監(jiān)聽與響應(yīng)相關(guān)操作技巧,需要的朋友可以參考下2017-03-03Android自定義可點擊的ImageSpan并在TextView中內(nèi)置View
這篇文章主要為大家詳細(xì)介紹了Android自定義可點擊的ImageSpan并在TextView中內(nèi)置"View",具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-11-11Android使用內(nèi)置WebView打開TextView超鏈接的實現(xiàn)方法
這篇文章主要介紹了Android使用內(nèi)置WebView打開TextView超鏈接的實現(xiàn)方法,文中給出了詳細(xì)的示例代碼,對各位Android開發(fā)者們具有一定的參考價值,需要的朋友們下面來一起看看吧。2017-03-03android studio2.3如何編譯動態(tài)庫的過程詳解
這篇文章主要給大家介紹了關(guān)于android studio 2.3如何編譯動態(tài)庫的過程,文中通過示例代碼介紹的非常詳細(xì),對各位Android開發(fā)者們具有一定的參考學(xué)習(xí)價值,需要的朋友們下面跟著小編來一起學(xué)習(xí)學(xué)習(xí)吧。2017-08-08