2012-02-25 59 views
1

我已經實現了CustomRadioButton從this Link自定義RadioButton不顯示文本

在這裏,實現主題以設置CustomRadioButton,然後將該主題添加到活動中。

我已經完成了大多數步驟,它的工作很好。但是我想在那個radioButton上添加文本,那麼這是不可能的?

爲什麼我無法設置RadioButton的文本?

+0

你使用的XML標籤'android:text =「text」'? – 2012-02-25 07:26:59

+0

我有它,但仍然沒有得到文本。 – 2012-02-25 07:44:47

+0

你可以發佈你的代碼嗎? – 2012-02-25 09:44:19

回答

2

它可能是你的寬度或顏色。你的單選按鈕是這樣的嗎?

<RadioButton 
    android:id="@+id/type_pounds" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/pounds" 
    android:textColor="#000000" /> 
相關問題