Android切换开关右侧的文字

时间:2016-11-01 09:20:55

标签: android switch-statement togglebutton

我用谷歌搜索过,但似乎没有办法让文字显示在右侧,而不是默认的左侧。图像说明。

我知道有没有办法让Android Switch的右侧显示文字(“声音”)(Android将它们归类为相同的)?

Switch Button

Switch Android Text Right

1 个答案:

答案 0 :(得分:0)

enter image description here我不知道为什么你会挣扎,但当我尝试下面的代码时,文本出现在切换按钮的右侧

<Switch
        android:text="Switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/switch1"
        />