1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:tools="http://schemas.android.com/tools"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. tools:context="com.example.homework05.MainActivity" >
  6.  
  7. <RelativeLayout
  8. android:layout_width="fill_parent"
  9. android:layout_height="50dp">
  10. <!-- 城市 -->
  11. <!-- drawableLeft:在文字左边设置图标 -->
  12. <TextView
  13. android:id="@+id/city"
  14. android:layout_width="wrap_content"
  15. android:layout_height="match_parent"
  16. android:drawableLeft="@drawable/city"
  17. android:text="北京"
  18. android:gravity="center"/>
  19. <!-- 扫一扫 -->
  20. <!-- android:adjustViewBounds="true" 是否调整自己的边界来保 持所显示图片的长宽比-->
  21. <ImageView
  22. android:id="@+id/image_scan"
  23. android:layout_width="wrap_content"
  24. android:layout_height="match_parent"
  25. android:src="@drawable/codescan"
  26. android:layout_alignParentRight="true"
  27. android:adjustViewBounds="true"/>
  28. <!-- 搜索编辑框 -->
  29. <EditText
  30. android:id="@+id/edit"
  31. android:layout_width="match_parent"
  32. android:layout_height="match_parent"
  33. android:hint="请输入。。。"
  34. android:layout_toRightOf="@id/city"
  35. android:layout_toLeftOf="@id/image_scan"/>
  36. <!-- 搜索图标-->
  37. <ImageView
  38. android:id="@+id/image_search"
  39. android:layout_width="wrap_content"
  40. android:layout_height="match_parent"
  41. android:src="@drawable/home_search_icon"
  42. android:layout_alignRight="@id/edit"
  43. android:layout_centerVertical="true"/>
  44. </RelativeLayout>
  45. <!-- 右下角的购物车 -->
  46. <ImageView
  47. android:id="@+id/image_buy"
  48. android:layout_width="80dp"
  49. android:layout_height="80dp"
  50. android:src="@drawable/buy"
  51. android:layout_alignParentBottom="true"
  52. android:layout_alignParentRight="true"/>
  53. <!-- 下面的标签选项 -->
  54. <!-- android:button="@null"不显示单选按钮的圆圈 -->
  55. <RadioGroup
  56. android:id="@+id/group"
  57. android:layout_width="match_parent"
  58. android:layout_height="50dp"
  59. android:layout_alignParentBottom="true"
  60. android:layout_toLeftOf="@id/image_buy"
  61. android:weightSum="4"
  62. android:orientation="horizontal">
  63. <RadioButton
  64. android:id="@+id/btn_home"
  65. android:layout_width="0dp"
  66. android:layout_height="match_parent"
  67. android:layout_weight="1"
  68. android:text="首页"
  69. android:gravity="center"
  70. android:button="@null"
  71. android:checked="true"
  72. android:drawableTop="@drawable/select_home"
  73. />
  74. <RadioButton
  75. android:id="@+id/btn_person"
  76. android:layout_width="0dp"
  77. android:layout_height="match_parent"
  78. android:layout_weight="1"
  79. android:text="分类"
  80. android:gravity="center"
  81. android:button="@null"
  82. android:drawableTop="@drawable/select_person"
  83. />
  84. <RadioButton
  85. android:id="@+id/btn_new"
  86. android:layout_width="0dp"
  87. android:layout_weight="1"
  88. android:layout_height="match_parent"
  89. android:text="新品"
  90. android:gravity="center"
  91. android:button="@null"
  92. android:drawableTop="@drawable/select_new"
  93. />
  94. <RadioButton
  95. android:id="@+id/btn_search"
  96. android:layout_width="0dp"
  97. android:layout_weight="1"
  98. android:layout_height="match_parent"
  99. android:text="搜索"
  100. android:gravity="center"
  101. android:button="@null"
  102. android:drawableTop="@drawable/select_search"
  103. />
  104. </RadioGroup>
  105.  
  106. </RelativeLayout>

radioButton的简单使用的更多相关文章

  1. viewpage+RadioButton+Fragment简单导航界面

    https://blog.csdn.net/qibanxuehua/article/details/47333879

  2. (转载)SPRINGMVC表单标签简介

    SpringMVC表单标签简介 在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标签,这些标签都可以访问到ModelMap中的内容.下面将对这些标签一一介绍. 在正式介绍Spri ...

  3. SpringMVC表单标签简介

    在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标签,这些标签都可以访问到ModelMap中的内容.下面将对这些标签一一介绍. 在正式介绍SpringMVC的表单标签之前,我们需 ...

  4. SpringMVC框架(三)from标签(转)

    原文地址:http://blog.csdn.net/kutim/article/details/46682547 spring表单标签   <%@taglib uri="http:// ...

  5. [Aaronyang] 写给自己的WPF4.5 笔记5[数据绑定三巴掌1/3]

    生活总有意外,微笑对待每一件事,无需抱怨--Aaronyang的博客(www.ayjs.net) 博文摘要:数据库下载 教你如何在vs2013中不安装Mssql数据库,使用了Sqlserver Com ...

  6. [转]SpringMVC<from:form>表单标签和<input>表单标签简介

    原文地址:https://blog.csdn.net/hp_yangpeng/article/details/51906654 在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标 ...

  7. SpringMVC框架 之 from标签(转)

    原文地址:http://blog.csdn.net/kutim/article/details/46682547 spring表单标签   <%@taglib uri="http:// ...

  8. SpringMVC学习记录(五)--表单标签

    在使用SpringMVC的时候我们能够使用Spring封装的一系列表单标签,这些标签都能够訪问到ModelMap中的内容. 以下将对这些标签一一介绍. 1.引入标签头文件 在正式介绍SpringMVC ...

  9. Spring MVC框架及标签库

    1.Spring MVC技术 1. 当DispatcherServlet接到请求时,他先回查找适当的处理程序来处理请求.DispatcherServlet通过一个或者多个处理程序映射,将每个请求映射到 ...

随机推荐

  1. 【转】VC中对文件的读写

    原文网址:http://www.cnblogs.com/LJWJL/archive/2012/10/06/2712466.html 注意: 1.由于C是缓冲写 所以要在关闭或刷新后才能看到文件内容 2 ...

  2. arcgis for android访问arcgis server上自己制作部署的地图服务

    转自:http://gaomw.iteye.com/blog/1110437 本项目的开发环境是eclipse3.5 + ADT11插件+arcgis for andorid 插件 + arcgis ...

  3. HDU 2122

    思路:prime,考虑重边!!! #include<stdio.h> #include<string.h> int map[1001][1001],dist[1001]; in ...

  4. Code First to an Existing Database

    Code First to an Existing Database https://msdn.microsoft.com/en-us/data/jj200620 https://weblogs.as ...

  5. 正则表达式(来源http://deerchao.net/tutorials/regex/regex.htm)

    目录 跳过目录 本文目标 如何使用本教程 正则表达式到底是什么东西? 入门 测试正则表达式 元字符 字符转义 重复 字符类 分枝条件 反义 分组 后向引用 零宽断言 负向零宽断言 注释 贪婪与懒惰 处 ...

  6. Hadoop HDFS的常用命令

    1.将目录/root/data/下的item.txt复制到HDFS下的/user/root下: hadoop fs -copyFromLocal /root/data/item.txt itemdat ...

  7. Java笔记(二十四)……集合工具类Collections&Arrays

    Collections 集合框架的工具类,方法全部为静态 Collections与Collection的区别 Collection是集合框架的一个顶层接口,里面定义了单列集合的共性方法 Collect ...

  8. bzoj 1924 [Sdoi2010]所驼门王的宝藏(构图,SCC,DP)

    Description Input 第一行给出三个正整数 N, R, C. 以下 N 行,每行给出一扇传送门的信息,包含三个正整数xi, yi, Ti,表示该传送门设在位于第 xi行第yi列的藏宝宫室 ...

  9. TCA9546A

    The TCA9546A is a 4-channel, bidirectional translating switch for I 2 C buses that supports Standard ...

  10. android智能家居在线语音控制

    对于android 智能家居项目,如果能实现语音控制,无疑会丰富项目功能,改善用户体验,android语音识别的方法有三种:一是使用intent调用语音识别程序,二 是应用程序自己调用语音识别库,三是 ...