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通过一个或者多个处理程序映射,将每个请求映射到 ...
随机推荐
- phpcms v9会员中心文件上传漏洞
漏洞版本: phpcms v9 漏洞描述: PHPCMS V9采用OOP(面向对象)方式自主开发的框架.框架易扩展,稳定且具有超强大负载能力. phpcms v9会员中心上传头像处可未经过充分过滤,攻 ...
- BZOJ1895: Pku3580 supermemo
1895: Pku3580 supermemo Time Limit: 15 Sec Memory Limit: 64 MBSubmit: 77 Solved: 47[Submit][Status ...
- [NYOJ 43] 24 Point game
24 Point game 时间限制:3000 ms | 内存限制:65535 KB 难度:5 描述 There is a game which is called 24 Point game ...
- 使用PowerShell脚本部署定时器到MOSS2010
转:http://www.77site.com/tech/1087042010072906074113_2012050808152911.html 第一章 前言 在此次练习中,您将了解到如何使用Pow ...
- python导入模块时的路径疑惑
有一个事儿,以前没注意,今天发现了,记录一下. 假设一个python文件a.py中,有一段代码,是打印当前路径的.当单独执行a.py文件的时候,打印的是a.py的位置. 但是当a.py文件被其他pyt ...
- leecode 树的平衡判定 java
以前写过c++版本的,感觉java写的好舒心啊/** * Definition for binary tree * public class TreeNode { * int val; * TreeN ...
- nyoj 84阶乘后0的个数
描述 计算n!的十进制表示最后有多少个0 输入 第一行输入一个整数N表示测试数据的组数(1<=N<=100)每组测试数据占一行,都只有一个整数M(0<=M<=10000000) ...
- Jlink烧写图文教程
,点击安装 , 插上jlink,安装驱动后,红灯一直亮 ...
- shell if语句
方法1: if list :then #注意,这里是因为放一行了,所以要有";",如果then在下一行就不用“:”了 do something here ...
- NOIP2000 单词接龙
题三. 单词接龙 (27分) 问题描述 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的 ...