android中的单选和多选框
Android 单选 选框
2023-09-14 08:59:45 时间
先展示一下效果图
大致代码如下:
1 ?xml version="1.0" encoding="utf-8"? 2 TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="fill_parent" 4 android:layout_height="fill_parent" 6 TableRow 7 android:id="@+id/tableRow1" 8 android:layout_width="wrap_content" 9 android:layout_height="wrap_content" 11 TextView 12 android:id="@+id/textView1" 13 android:layout_width="wrap_content" 14 android:layout_height="wrap_content" 15 android:text="性别:" 16 android:textSize="11pt" / 18 RadioGroup 19 android:layout_gravity="center_horizontal" 20 android:orientation="horizontal" 22 RadioButton 23 android:id="@+id/radioButton1" 24 android:layout_width="wrap_content" 25 android:layout_height="wrap_content" 26 android:text="男" / 28 RadioButton 29 android:id="@+id/radioButton2" 30 android:layout_width="wrap_content" 31 android:layout_height="wrap_content" 32 android:text="女" / 33 /RadioGroup 34 /TableRow 36 TableRow 37 android:id="@+id/tableRow2" 38 android:layout_width="wrap_content" 39 android:layout_height="wrap_content" 41 TextView 42 android:id="@+id/textView2" 43 android:layout_width="wrap_content" 44 android:layout_height="wrap_content" 45 android:text="喜欢的颜色:" / 47 LinearLayout 48 android:layout_width="wrap_content" 49 android:layout_height="wrap_content" 50 android:orientation="vertical" 52 CheckBox 53 android:id="@+id/checkBox2" 54 android:layout_width="wrap_content" 55 android:layout_height="wrap_content" 56 android:text="红色" / 58 CheckBox 59 android:id="@+id/checkBox3" 60 android:layout_width="wrap_content" 61 android:layout_height="wrap_content" 62 android:text="绿色" / 64 CheckBox 65 android:id="@+id/checkBox1" 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:text="蓝色" / 69 /LinearLayout 70 /TableRow 72 /TableLayout
Android组件化开发(七)--从零开始教你分析项目需求并实现 前面几篇文章我们封装了几个组件化功能组件:包括:**网络请求组件,图片加载请求组件,应用保活组件,音乐播放组件封装。** 每个组件都可以直接拿到自己项目中使用,当然还需根据自己项目要求进行优化。
Android组件化开发(六)-- 短视频播放组件封装 前面几篇文章我们封装了几个组件化功能组件: 包括:`网络请求组件`,`图片加载请求组件`,`应用保活组件`,`音乐播放组件封装`。 每个组件都可以直接拿到自己项目中使用,当然还需根据自己项目要求进行优化。
Android组件化开发(五)--完整版音乐播放组件的封装 前面几篇系列文章我们讲解了`组件化开发`中几个常用功能组件的开发,包括:`网络请求组件`,`图片加载请求组件`,`应用保活组件`。今天我们来封装一个`音乐播放组件`。
Android组件化开发(四)--进程保活组件的封装 前面文章我们封装了网络请求组件`lib_nework`和图片加载组件`lib_image_loader`,今天我们来封装一个进程保活的组件`lib_pull_alive`
Android组件化开发(二)--网络请求组件封装 前面一篇文章我们讲解了`maven私服`的搭建,maven私服在`组件化框架`中有一个很重要的地位就是可以将我们的`lib`库放到局域网中,供公司其他开发者使用,实现类库的分享。 下面是这个系列准备实现的一个`组件化实战项目框架`:
相关文章
- 导入旧版本Android项目时的“Unable to resolve target ‘android
- Android API之android.content.AsyncQueryHandler
- 《android开发艺术探索》读书笔记(十五)--Android性能优化
- Android基于XMPP Smack openfire 开发的聊天室
- 【VLC-Android】Mac下编译vlc-android
- cordova(android ios) ota给蓝牙设备升级
- Android【报错】Failed to resolve: com.android.support:appcompat-v7:28.0.0-alpha【报错】
- Android 11.0 驱动禁用usb鼠标和usb键盘
- android 8.1 9.0 10.0Launcher3 背景和icon重影的问题解决
- Android 获取当前默认时区
- android app启动优化两种测量app启动时间的方式
- 【错误记录】Android Studio 编译时 lint 检查报错 ( WARNING: DSL element ‘android.dataBinding.enabled‘ is obsolet )
- 【Android Gradle 插件】DexOptions 配置 ② ( additionalParameters 属性配置 | dx 工具 | dx 附加参数 )
- Android的Bitmap和BitmapDrawable类解析-android学习之旅(六十)
- 【Android】android图片轮播
- 一步一步写一个简单通用的makefile(四)--写一个通用的makefile编译android可执行文件
- Appium - Android 对照 iOS
- Android实战技巧之十九:android studio导出jar包(Module)并获得手机信息
- Android培训班(69)Dex文件里类定义
- Android - 控件android:ems属性
- Android 自定义的验证码输入框(无光标),android版本10暂时不支持自定义粘贴
- 如何解决之Android Studio不能自动更新安装apk文件的问题
- 迁移到Android后android.support.v4.content.FileProvider运行崩溃