Demo2\togglebutton_demo\src\main\res\layout\activity_main. 1 <LinearLayout ="http://schemas.android.com/apk/res/android" 2 =& ...
Demo2\togglebutton_demo\src\main\res\layout\activity_main.
1 <LinearLayout ="http://schemas.android.com/apk/res/android" 2 ="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5 android:orientation="vertical" 6 tools:context=".MainActivity"> 7 8 <!--定义一个ToggleButton按钮--> 9 <ToggleButton10 android:id="@+id/toggle"11 android:layout_width="wrap_content"12 android:layout_height="wrap_content"13 android:checked="true"14 android:textOff="横向排列"15 android:textOn="纵向排列" />16 <!--定义一个可以动态改变方向的线性布局-->17 <LinearLayout18 android:id="@+id/test"19 android:layout_width="match_parent"20 android:layout_height="match_parent"21 android:orientation="vertical">22 23 <Button24 android:layout_width="wrap_content"25 android:layout_height="wrap_content"26 android:text="第一个按钮"/>27 <Button28 android:layout_width="wrap_content"29 android:layout_height="wrap_content"30 android:text="第二个按钮"/>31 <Button32 android:layout_width="wrap_content"33 android:layout_height="wrap_content"34 android:text="第三个按钮"/>35 </LinearLayout>36 37 </LinearLayout>
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:状态开关按钮(ToggleButton)
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。