1、RadioButton单选(RadioGroup)
<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,不写验证不予通过哟~
分享到:
相关推荐
Android ApiDemos ,包含各种控件,绘图,四大组件等具体实例
ApiDemos 6.0
最新Android apidemos
Android ApiDemos apk, 包括Android presentation双屏异显 demon, App>Activity>Presentation
API Demos 是 Google 为了 Android 开发者所提供的一个 Android API 合集,其中包含了很多的 API 范例,同时遵循了良好的代码规范,是一个值得开发者研究和学习的典型。android的ApiDemos,需要解压缩后使用。
该Api Demos 源码是基于Android6.0 ,Eclipse下的,可以直接使用Android studio 导入工程即可。
Android 5.1的ApiDemos安装包
Android官网ApiDemos源码 供大家学习参考之用
集合很多Api列子 很适合新手学习哦 android Api列子 android例子代码演示 android例子
最新ApiDemos源码,直接下载导入即可使用,android studio工程
android APIdemos,android 源码简单使用demos
从官方预览包里提取的Android6.0 ApiDemos.apk,方便安装在真机上查看实例的实际效果。
android6.0 模拟器里提取的, 可以直接安装到手机上使用
最新版ApiDemos Android SDK 中带有很多例子,其中ApiDemo 详细介绍了Android 平台主要API,分成了 · App · Content · Graphics · Media · OS · Text · Views 几个大类,每个大类又分为几个小类,...
android api19 ApiDemos .
Android2.2 ApiDemos Android2.2 ApiDemos Android2.2 ApiDemos
Android 8.1 上的Api使用实例源码,很方便初学者学习使用,对一些不熟悉的api也是很有学习价值的。
ApiDemos_2.3
ApiDemos多种样式APIS控件源码,该源码实现了很多种的弹出控件,如对话框,appwidget,content,graphics,media,text,等API,功能很强大的,而且基本实现了常用的控件功能了。