1、RadioButton单选(RadioGroup)
2、checkbox星形样式:
4、ToggleButton:
5、TextView
margin边沿:是与父容器之间的距离。
padding填充:是与子容器自检的距离。
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RadioButton
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="radiobutton_1"
/>
<RadioButton android:id="@+id/radio2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="radiobutton_2"
/>
</RadioGroup>
2、checkbox星形样式:
<CheckBox android:id="@+id/star"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收藏"
style="?android:attr/starStyle"
/>
4、ToggleButton:
<ToggleButton
android:id="@+id/toggle1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
5、TextView
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:text="@string/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceLarge"
android:focusable="true"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:text="@string/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="?android:attr/textColorSecondary"
android:focusable="true"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:text="@string/textColorTertiary"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="?android:attr/textColorTertiary"
android:focusable="true"
/>
margin边沿:是与父容器之间的距离。
padding填充:是与子容器自检的距离。
效果图:
希望本文对广大安卓开发者有所帮助,感谢阅读本文。更多安卓技术问题欢迎加群探讨:278744577,验证码:csl,不写验证不予通过哟~