我有一个SwitchCompat
:
<android.support.v7.widget.SwitchCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Some title"/>
我想防止点击文本标题。当我单击文本标题时,切换开关。但我只想在单击切换图标时进行切换。
可能吗?或者我是否必须为此创建两个单独views
的:一个TextView
用于标题,一个SwitchCompat
没有文本?