Android RadioGroup,显示问题
来源:互联网 发布:猫知老鼠四川方言版 编辑:程序博客网 时间:2024/06/07 05:01
近期 更新完最新的adt和sdk出现很多问题,首先在编码过程中有些许 改变,这是一个radiogroup中包含的3个radiobutton,设置wight都为1,但是出现如上图的情况:下面是xml中的代码
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RadioGroup
android:id="@+id/mainRadiolayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:paddingBottom="12dp"
android:paddingTop="5dp" >
<RadioButton
android:id="@+id/rentCar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:text="我是车主"
android:textSize="12sp" />
<RadioButton
android:id="@+id/carOwner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:text="我是租客"
android:textSize="12sp" />
<RadioButton
android:id="@+id/user"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:text="我的"
android:textSize="12sp" />
</RadioGroup>
</LinearLayout>
纠结了半天,一种找不到原因 ,分析上图,可能是因为之前button设为null的时候是不占位置的,而最新的adt编译之后是占位置的,终于在stackoverflow发现有这个问题,
在每个radiobutton中加入padding=“0dp”就ok了
- Android RadioGroup,显示问题
- Android RadioGroup 横向显示
- Android RadioGroup多行显示,解决单选问题
- Android 动态生成 radiobutton 解决 radiogroup 多行显示的问题 单选
- Android RadioGroup 横向显示(两行两列)
- android ViewPager和RadioGroup的连接问题
- Android RadioGroup单选框变成多选问题
- Android RadioGroup
- RadioGroup没有文字只显示图片,图片居中问题
- Android RadioGroup中横向、竖向布局RadioButton的问题
- Android开发:CompoundButton.onCheckedChangeListener和RadioGroup.onCheckedChangeListener冲突问题
- Android RadioGroup中横向、竖向布局RadioButton的问题
- android RadioGroup中的RadioButton手动设置相关问题
- android布局中FrameLayout与RadioGroup排版问题
- Android开发—RadioGroup中RadioButton默认选中问题
- Android布局中有两个RadioGroup的RadioButton选中问题
- radiogroup子项值的问题
- RadioGroup 多行多列单选问题
- 内网中使用metasploit进行渗透测试
- oracle 静默安装
- 【性能专题】Java性能调优
- 九度_题目1522:包含min函数的栈
- [搜索] 理解compass的配置文件
- Android RadioGroup,显示问题
- .NET中参数化查询数据库
- [sftp root@192.168.1.20 << -!] 中 " <<! " 是什麼意思呀
- 模拟和HTML5的ploceholder的效果
- mac下eclipse配置svn的方法
- onbeforeunload与onunload事件
- Hibernate 中的主健 ID 映射配置问题
- win7 mysql数据库安装于vc6.0下数据库调用
- qt录音--raw(pcm)文件转换wav文件