簡體   English   中英

單選按鈕使單選按鈕外圈的顏色與選擇單選按鈕時的顏色不同

[英]radio button make radio button outer circle a different colour to the colour when the radio button is selected

我需要在Android中自定義單選按鈕的幫助。 基本上我想做的是將單選按鈕設置為白色,並且當用戶單擊或選擇單選按鈕時,我希望內圈為藍色,外圈為白色。
我知道我可以使用buttonTint,但是當用戶選擇單選按鈕為相同顏色時,這將同時設置外圓和內圓。
我想做什么甚至可能?

謝謝

在此處輸入圖片說明

使用RadioButton buttonTint屬性:

<RadioButton
    android:id="@+id/radio_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:checked="true"
    android:buttonTint="OUTER_CIRCLE_COLOR_CODE"/>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM