我已經定製了原有的單選按鈕與一個特定的背景和通過去除按鈕:如何居中文本單選按鈕
styles.xml:
radio.xml:
<RadioGroup android:layout_height="wrap_content" android:id="@+id/radioGroup1" android:layout_width="fill_parent" android:orientation="horizontal" android:layout_marginTop="10dp">
<RadioButton style="@style/echelle_relecture" android:text="@string/day" android:id="@+id/jour" android:checked="true"></RadioButton>
<RadioButton style="@style/echelle_relecture" android:text="@string/hour" android:id="@+id/hour" android:button="@null"></RadioButton>
<RadioButton style="@style/echelle_relecture" android:text="@string/min" android:id="@+id/mins" android:button="@null" android:enabled="false"></RadioButton>
</RadioGroup>
儘管「center_horizontal」參數我不能讓文本居中在裏面但噸。我怎樣才能做到這一點 ?
雖然此代碼段可以解決的問題,[包括一個解釋](http://meta.stackexchange.com/questions/114762/解釋完全基於代碼的答案)確實有助於提高帖子的質量。請記住,您將來會爲讀者回答問題,而這些人可能不知道您的代碼建議的原因。 –