1

我想为我的 SwitchCompat 小部件设置描述。有谁知道怎么做?

“android:text”是前导文本,但我想设置描述或“摘要”。(我英语不是很好)

我的代码:

<android.support.v7.widget.SwitchCompat
                android:id="@+id/my_switch"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/switch_title"
                android:button="@null"
                android:padding="20dp"/>
4

1 回答 1

-1

看来您必须在与 SwitchCompat 相同的布局中添加一个 TextView,如下所示https://github.com/Grarak/KernelAdiutor/blob/master/app/src/main/res/layout/switchcompat_cardview.xml

于 2015-10-18T16:45:09.393 回答