【问题标题】:How to set a text at the left of a RadioButton without using TextView?如何在不使用 TextView 的情况下在 RadioButton 的左侧设置文本?
【发布时间】:2014-11-20 21:32:21
【问题描述】:

有没有将radio button 的文本设置在它的左边? 我检查了xml filesradio buttonelemnt的属性,没有找到这样的属性?

所以,如果这样的属性不可用,如何在 radio button 的左侧写文本,因为我的 radio buttonsradioGroup 的孩子,我不想使用 textView elemnt。

【问题讨论】:

    标签: android radio-button radio-group


    【解决方案1】:

    尝试为每个单选按钮添加属性android:button="@null"android:drawableRight="@android:drawable/btn_radio"

    【讨论】:

      【解决方案2】:

      在你的 RadioButton 上试试这个:

       android:button="@null"
       android:drawableRight="@android:drawable/btn_radio"
       android:drawablePadding="10dp"
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-09-22
        • 2023-03-03
        • 1970-01-01
        • 2018-10-22
        • 2011-03-10
        • 2012-06-19
        • 2019-10-30
        相关资源
        最近更新 更多