radioButton的简单使用
<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"
tools:context="com.example.homework05.MainActivity" > <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="50dp">
<!-- 城市 -->
<!-- drawableLeft:在文字左边设置图标 -->
<TextView
android:id="@+id/city"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:drawableLeft="@drawable/city"
android:text="北京"
android:gravity="center"/>
<!-- 扫一扫 -->
<!-- android:adjustViewBounds="true" 是否调整自己的边界来保 持所显示图片的长宽比-->
<ImageView
android:id="@+id/image_scan"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/codescan"
android:layout_alignParentRight="true"
android:adjustViewBounds="true"/>
<!-- 搜索编辑框 -->
<EditText
android:id="@+id/edit"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="请输入。。。"
android:layout_toRightOf="@id/city"
android:layout_toLeftOf="@id/image_scan"/>
<!-- 搜索图标-->
<ImageView
android:id="@+id/image_search"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/home_search_icon"
android:layout_alignRight="@id/edit"
android:layout_centerVertical="true"/>
</RelativeLayout>
<!-- 右下角的购物车 -->
<ImageView
android:id="@+id/image_buy"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/buy"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>
<!-- 下面的标签选项 -->
<!-- android:button="@null"不显示单选按钮的圆圈 -->
<RadioGroup
android:id="@+id/group"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@id/image_buy"
android:weightSum="4"
android:orientation="horizontal">
<RadioButton
android:id="@+id/btn_home"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="首页"
android:gravity="center"
android:button="@null"
android:checked="true"
android:drawableTop="@drawable/select_home"
/>
<RadioButton
android:id="@+id/btn_person"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="分类"
android:gravity="center"
android:button="@null"
android:drawableTop="@drawable/select_person"
/>
<RadioButton
android:id="@+id/btn_new"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:text="新品"
android:gravity="center"
android:button="@null"
android:drawableTop="@drawable/select_new"
/>
<RadioButton
android:id="@+id/btn_search"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:text="搜索"
android:gravity="center"
android:button="@null"
android:drawableTop="@drawable/select_search"
/>
</RadioGroup> </RelativeLayout>

radioButton的简单使用的更多相关文章
- viewpage+RadioButton+Fragment简单导航界面
https://blog.csdn.net/qibanxuehua/article/details/47333879
- (转载)SPRINGMVC表单标签简介
SpringMVC表单标签简介 在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标签,这些标签都可以访问到ModelMap中的内容.下面将对这些标签一一介绍. 在正式介绍Spri ...
- SpringMVC表单标签简介
在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标签,这些标签都可以访问到ModelMap中的内容.下面将对这些标签一一介绍. 在正式介绍SpringMVC的表单标签之前,我们需 ...
- SpringMVC框架(三)from标签(转)
原文地址:http://blog.csdn.net/kutim/article/details/46682547 spring表单标签 <%@taglib uri="http:// ...
- [Aaronyang] 写给自己的WPF4.5 笔记5[数据绑定三巴掌1/3]
生活总有意外,微笑对待每一件事,无需抱怨--Aaronyang的博客(www.ayjs.net) 博文摘要:数据库下载 教你如何在vs2013中不安装Mssql数据库,使用了Sqlserver Com ...
- [转]SpringMVC<from:form>表单标签和<input>表单标签简介
原文地址:https://blog.csdn.net/hp_yangpeng/article/details/51906654 在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标 ...
- SpringMVC框架 之 from标签(转)
原文地址:http://blog.csdn.net/kutim/article/details/46682547 spring表单标签 <%@taglib uri="http:// ...
- SpringMVC学习记录(五)--表单标签
在使用SpringMVC的时候我们能够使用Spring封装的一系列表单标签,这些标签都能够訪问到ModelMap中的内容. 以下将对这些标签一一介绍. 1.引入标签头文件 在正式介绍SpringMVC ...
- Spring MVC框架及标签库
1.Spring MVC技术 1. 当DispatcherServlet接到请求时,他先回查找适当的处理程序来处理请求.DispatcherServlet通过一个或者多个处理程序映射,将每个请求映射到 ...
随机推荐
- Samba nsswitch/pam_winbind.c文件输入验证漏洞
漏洞名称: Samba nsswitch/pam_winbind.c文件输入验证漏洞 CNNVD编号: CNNVD-201312-047 发布时间: 2013-12-05 更新时间: 2013-12- ...
- [HDU 1561] The more, The Better
The more, The Better Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Oth ...
- C# 配置文件读取与修改
C# 配置文件读取与修改 配置文件在很多情况下都使用到, 配置文件分为两种 一种是应用程序的配置文件, 一种是web的配置文件. 两种配置文件最大的区别是web的配置文件更新之后会实时更新, 应用 ...
- Read ListViewItem content from another process z
Normal Windows GUI applications work with messages that are sent to a window or control and the cont ...
- [Tommas] UNION 和 UNION ALL 的区别
UNION指令的目的是将两个 SQL 语句的结果合并起来.从这个角度来看,UNION跟 JOIN 有些许类似,因为这两个指令都可以由多个表格中撷取资料.UNION的一个限制是两个 SQL 语句所产生的 ...
- tyvj P1519 博彩游戏(AC自动机+DP滚动数组)
P1519 博彩游戏 背景 Bob最近迷上了一个博彩游戏…… 描述 这个游戏的规则是这样的:每花一块钱可以得到一个随机数R,花上N块钱就可以得到一个随机序列:有M个序列,如果某个序列是产生的随机序列的 ...
- IBOutlet & IBAction
IBOutlet UILabel *label; 这个label在Interface Builder里被连接到一个UILabel.此时,这个label的retainCount为2. 所以,只要使用了I ...
- Windows7 64位机上Emgu CV2.4.2安装与配置
Windows7 64位机上Emgu CV2.4.2安装与配置 分类: Emgu CV 2012-11-28 17:22 92 ...
- 剖析iphone之触摸事件touchstart
今天做项目发现一个问题,貌似从前没有遇到过,就记录一下,以后方便看.....(代码只显示了js这部分 样式结构都会写) 一般我们绑定click触发事件都是直接用onclick 或者方便一点click, ...
- children真的没有兼容性问题吗?
获取某一节点的所有子元素节点,你会用什么方法? 如果你用childNodes,那会有兼容性问题,对于标准浏览器,他包含的是元素节点和文本节点,我们还需要循环来判断节点的类型,是文本节点还是元素节点,不 ...