1

android:button でドローアブルを変更し、上部にテキストを表示するラジオボタンを作成するにはどうすればよいですか? 通常のラジオ ボタンでは、テキストはドローアブルの後ろに重ねられます。

今、私は自分のラジオボタンのイライラした実装に出始めています。

私はこのようなものが欲しい:

<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >
    <RadioButton
        android:text="something that is on top"
        android:id="@+id/toggle_tab_left"
        android:button="@drawable/main_selector"
        style="@style/TabStyle"/>
    <RadioButton 
        android:button="@drawable/info_selector"
        android:text="something that is on top"
        android:id="@+id/toggle_tab_right"
        style="@style/TabStyle"/>
</RadioGroup>
4

1 に答える 1

3

background代わりにグラフィックの 属性を使用して、buttonを @null または透明色に設定できます。

于 2012-04-11T13:46:19.203 に答える