提问人:Malo 提问时间:11/17/2023 更新时间:11/17/2023 访问量:21
Android如何创建显示文本的开关,如何打开和关闭?
android how to create a switch with showing text on and off how?
问:
我想在我的 Android 应用程序中创建一个开关或切换开关,以打开和关闭文本,就我而言,我使用它
<Switch
android:id="@+id/it_radio_group"
style="@style/RectangularSwitchStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="5dp"
android:showText="true"
android:switchTextAppearance="@style/SwitchTextAppearanceOn"
android:textOff="No"
android:textOn="Yes"
android:checked="false"
android:textSize="16sp"
android:thumb="@drawable/rectangle_switch_thumb"
android:track="@drawable/rectangle_switch" />
我也想显示文本“是”,并使其默认不被点击,我没有通过搜索找到任何东西
答: 暂无答案
评论