RadioButton的特定使用场景
来源:互联网 发布:网络延迟对网速的影响 编辑:程序博客网 时间:2024/06/04 19:16
1 使用场景:
结合radioGroup实现类似微信底部导航的效果
2 使用问题:
我是用纯代码动态添加radioButton , 根据需求 需要去掉button
RadioButton button; for (int i = 0; i < titleNames.length; i++) { button = new RadioButton(context); // 隐藏左侧 button button.setButtonDrawable(new ColorDrawable(Color.TRANSPARENT)); ........ addView(button, params); }
在高版本上显示没有问题,在低版本上(如<=16)就会出现下面情况
3 解决办法:
就算纯代码添加radiobutton ,radiobutton的对象的创建也要从xml中引用(期待大神的别的解决方案)
RadioButton button; for (int i = 0; i < titleNames.length; i++) {// 从xml 引用 button = (RadioButton) View.inflate(getContext(), R.layout.but,null); addView(button, params); }
<?xml version="1.0" encoding="utf-8"?><RadioButton xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="wrap_content" android:button="@null" android:background="@null" ></RadioButton>
android:button="@null"
android:background="@null" 这两个是关键点
0 0
- RadioButton的特定使用场景
- 特定场景下Ajax技术的使用
- RadioButton和CheckBox的区别及使用场景
- 特定场景的Cralwer
- 使用句柄实现特定场景的无备份恢复
- RadioButton的使用
- 单选框RadioButton的使用
- radiobutton的使用
- radiobutton的使用
- RadioButton的使用
- radioButton的使用
- CheckBox与RadioButton的使用
- Android组件的使用:RadioButton
- RadioButton和CheckBox的使用
- 安卓RadioButton的使用
- RadioButton与 checkBox的使用
- RadioButton下划线效果的使用
- Android中RadioButton的使用
- RevitAPI:监听文档改变ControlledApplication/Application.DocumentChanged事件
- iOS企业发布问题记录三(Log Guru 使用方法)
- 问题记录
- 平台中配置网格列表样式报:ORA-01461错误
- html js highcharts绘制圆饼图表
- RadioButton的特定使用场景
- java中判断字符串是否为数字的三种方法
- Spring 4.2.4.RELEASE MVC 学习笔记 - 4.1(咋个办呢 zgbn)
- B-Queue on Bus Stop
- 画流程图的工具
- 配置简单cas客户端
- Android Touch事件分发—拦截—处理
- Objective-C页面跳转方法总结
- 新手学习opencv六:kmeans聚类