[英]Customizing radiobuttons in android
如答案所示-在這里我得到了所需的輸出
我得到的輸出為 :
保留所有其他功能,我想顯示image
代替Button
文本
我怎么能做到這一點 !
您無法設置文本並設置android:button="@drawable/some_drawable"
而不是 android:button="@android:color/transparent"
,如下所示:
<RadioButton
android:id="@+id/radio0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/yourbuttonbackground"
android:button="@drawable/some_drawable"
android:checked="true"
/>
您只有3種方法可以在RadioButton中設置可繪制對象:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.