<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.question_6.MainActivity$PlaceholderFragment" > <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="18dp"
android:text="你喜欢车吗?"
android:textAppearance="?android:attr/textAppearanceSmall" /> <CheckBox
android:id="@+id/CheckBox01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="名车" /> <TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/CheckBox01"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:gravity="center"
android:text="你更喜欢什么"
android:textAppearance="?android:attr/textAppearanceSmall" /> <CheckBox
android:id="@+id/CheckBox03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/checkBox3"
android:layout_centerVertical="true"
android:text=" 爱人" /> <CheckBox
android:id="@+id/CheckBox02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/checkBox2"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text=" 金钱" /> <Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/CheckBox03"
android:layout_centerHorizontal="true"
android:onClick="setting"
android:text="确定" /> <RadioGroup
android:id="@+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="match_parent" >
</RadioGroup> <TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/button1"
android:text="你的基本信息"
android:textAppearance="?android:attr/textAppearanceLarge" /> <TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="@string/hello_world" /> <CheckBox
android:id="@+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/checkBox1"
android:layout_alignBottom="@+id/checkBox1"
android:layout_alignParentRight="true"
android:text="别克君威" /> <CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/TextView01"
android:layout_alignParentLeft="true"
android:layout_marginBottom="22dp"
android:text="宝马" /> <CheckBox
android:id="@+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/checkBox2"
android:layout_alignBottom="@+id/checkBox2"
android:layout_toLeftOf="@+id/checkBox2"
android:text="阿斯顿马丁" /> <RadioGroup
android:id="@+id/radioGroup2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/textView1"
android:orientation="vertical" > <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" > <RadioButton
android:id="@+id/radio0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1.53"
android:checked="true"
android:text="喜欢" /> <RadioButton
android:id="@+id/radio1"
android:layout_width="108dp"
android:layout_height="wrap_content"
android:text="不喜欢" /> </LinearLayout> </RadioGroup> <TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/checkBox2"
android:layout_alignLeft="@+id/checkBox3"
android:text="你想买哪个牌子的车"
android:textAppearance="?android:attr/textAppearanceSmall" /> </RelativeLayout>

再附上一个链接

RadioGroup

RadioGroup单选按钮排版的更多相关文章

  1. Android控件-单选按钮RadioButton

    RadioGroup单选按钮用法,还是先看效果图 先中后,点RadioGroup测试按钮,可在标题栏显示选择结果,点清除可以清除选择.下面上代码,main.xml: <RadioGroup an ...

  2. Android自定义控件1--自定义控件介绍

    Android控件基本介绍 Android本身提供了很多控件比如我们常用的有文本控件TextView和EditText:按钮控件Button和ImageButton状态开关按钮ToggleButton ...

  3. android 属性

    RelativeLayout 第一类:属性值为true可false android:layout_centerHrizontal        水平居中 android:layout_centerVe ...

  4. Android 自定义RadioButton实现

    由于使用小米系统MIUI运行是RadioButton样式跟google Android API自定义的不一样,则我们可以定义任何想要的东东.没有做不到,只有想不到 Android 自定义RadioBu ...

  5. Android开发 ---xml布局元素

    1.android:orientation="vertical/horizontal" vertical为垂直布局, horizontal为水平布局 2.android:layou ...

  6. Android------------UI的控件学习内容

    1. android:gravity="fill_horizontal"  :  文本在显示框中内容显示的位置 2.ToggleButton :  切换按钮 3.RadioGrou ...

  7. Android layout 布局 属性详解

    第一类:属性值 true或者 false           android:layout_centerHrizontal 水平居中     android:layout_centerVertical ...

  8. Android layout布局属性、标签属性总结大全

    RelativeLayout 第一类:属性值为true可false android:layout_centerHrizontal        水平居中 android:layout_centerVe ...

  9. Android控件介绍

    1. 介绍 Android控件大多位于android.widget, android.view.View为他们的父类对于Dialog系列, android.app.Dialog为父类 Android的 ...

随机推荐

  1. Linux 查看文件内容的命令

    转载自:新浪博客 (观看档案内容 : cat, tac, more, less, head, tail, nl, 刚刚我们提到的都只是在于显示档案的外观,或者是移动与复制一个档案或目录而已,那么如果我 ...

  2. Spring+SpringMVC+Mybatis+MAVEN+Eclipse+项目完整环境搭建

    1.新建一个Maven项目,创建父项目. 2.创建子项目模块 3.创建javaWeb项目 4.创建后的项目目录结构 5.Maven文件配置 parent父项目pom.xml文件配置 <?xml ...

  3. 9 Palindrome Number(判断是否为回文数Easy)

    题目意思:判断是否为回文数,不许使用额外空间 ps:一直不理解额外空间的意思,int能用吗 思路:1.比较头尾 2.翻转,越界问题需考虑 class Solution { public: bool i ...

  4. jQuery自带的一些常用方法总结

    jQuery自带的一些常用方法总结 这篇文章主要介绍了jQuery自带的一些常用方法总结,包括$.trim .$.contains.$.each.$.map.$.inArray.$.extend等,需 ...

  5. 使用微妙计算PHP脚本执行时间

    在PHP中,大多数的时间格式都是以UNIX时间戳表示的,而UNIX时间戳是以s(秒)为最小的计量时间的单位.这对某些应用程序来说不够精确,所以可以调用microtime()返回当前UNIX时间戳和微妙 ...

  6. 扩展《C程序设计语言》练习2-3程序通用性

    最近开始自学C语言,在看K&R的<C程序设计语言>.练习2-3要求写一个函数,将输入的十六进制数字字符串转换成与之等价的整数值,配套答案没有扩展程序的通用性,所以我就稍微改造改造. ...

  7. ajax vs oauth

    http://www.cnblogs.com/rush/archive/2012/05/15/2502264.html https://www.ibm.com/developerworks/cn/xm ...

  8. 配置Session变量的生命周期

    在Web.config文件中配置Session变量的生命周期是在<sessionState></sessionState>节中完成的,在配置Session的生命周期时,可以设置 ...

  9. 第三代搜索推出网民评价系统,seo末日还会远吗?

    昨天的360搜索可谓风光无限,两大搜索新品同日上线,至今360导航页面依旧飘荡着两者的身影,但是不少站长从此却是忧心忡忡,seo末日是否真的要到来了?笔者想起数日前写的一篇博文:seo末日言论频频来袭 ...

  10. 14.4.4 Redo Log Buffer

    14.4.4 Redo Log Buffer redo log buffer 是内存区域持有数据被写入到redo log. Redo log buffer size 是通过 innodb_log_bu ...