`
jishublog
  • 浏览: 869985 次
文章分类
社区版块
存档分类
最新评论

【代码】ApiDemos中摘录的部分控件效果图

 
阅读更多
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填充:是与子容器自检的距离。

效果图:

http://www.android100.org/uploadfile/2012/0321/20120321095001401.jpg


希望本文对广大安卓开发者有所帮助,感谢阅读本文。更多安卓技术问题欢迎加群探讨:278744577,验证码:csl,不写验证不予通过哟~

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics