当前位置:网站首页>单选按钮 文字背景同时改变
单选按钮 文字背景同时改变
2022-06-11 17:49:00 【xiaoerbuyu1233】
<RadioButton
android:id="@+id/tank_warning_setting_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_100"
android:background="@drawable/radiobutton_background"
android:button="@null"
android:text="选项2"
android:textColor="@drawable/radiobutton_textcolor"
android:textSize="@dimen/sp_40" />
radiobutton_background
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/radiobutton_background_unchecked" android:state_checked="false" />
<item android:drawable="@drawable/radiobutton_background_checked" android:state_checked="true" />
</selector>
radiobutton_background_unchecked
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 背景填充 -->
<solid android:color="@color/white" />
<!-- 圆角 -->
<corners android:radius="5dp" />
<stroke
android:width="5dp"
android:color="@color/color_text_gray" /><!-- 描边,边框宽度、颜色 -->
</shape>radiobutton_background_checked
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充 -->
<solid android:color="#f59a23" />
<!-- 圆角 -->
<corners android:radius="5dp" />
<stroke
android:width="5dp"
android:color="@color/color_text_gray" /><!-- 描边,边框宽度、颜色 -->
</shape>radiobutton_textcolor
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/color_text_gray" android:state_checked="false" />
<item android:color="@color/white" android:state_checked="true" />
</selector>
android shape设置渐变、圆角、边框线_wapchief的博客-CSDN博客_android shape 边框
Android RadioButton设置选中时文字和背景颜色同时改变_mb5fcdf3205bda3的技术博客_51CTO博客
边栏推荐
- [collect first and use it sooner or later] 49 Flink high-frequency interview questions series (I)
- There are so many open source projects. This time, I'll show you the differences between different versions and understand the meaning of alpha version, beta version and RC version
- After class, I looked at the document and went back to the lab. I picked up the forgotten SQL operators again
- Service learning notes 04 other service implementation methods and alternative methods
- 6-2 writing articles (*)
- vulhub
- Can 400 fans earn 20W a month? How did you do it?
- [collect first and use it sooner or later] 100 Flink high-frequency interview questions series (II)
- 【先收藏,早晚用得到】100个Flink高频面试题系列(一)
- vulhub
猜你喜欢

Threejs uses indexeddb cache to load GLB model

網絡安全威脅情報體系

送给大模型的「高考」卷:442人联名论文给大模型提出204个任务,谷歌领衔

Network Security Threat Intelligence System
![[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (III)](/img/cf/44b3983dd5d5f7b92d90d918215908.png)
[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (III)

Line up to pick up the express. At this meeting, I sorted out all kinds of code sets

Merge two ordered linked lists ---2022/02/24
![Winter vacation daily question (improvement group) [end of week 4]](/img/67/89b5164712d8c4eb319b9266dd4b91.jpg)
Winter vacation daily question (improvement group) [end of week 4]
![Winter vacation daily question 2022 [week1 not finished]](/img/56/a5ca98ddd128bcceb8e24f0edfeac6.jpg)
Winter vacation daily question 2022 [week1 not finished]

夜神安装apk,以及bp代理
随机推荐
[MapReduce] a complete Mr program case teaches you how to package and run with idea
Intelligent overall legend, legend of wiring, security, radio conference, television, building, fire protection and electrical diagram [transferred from wechat official account weak current classroom]
MFSR:一种新的推荐系统多级模糊相似度量
如何学习和自学
10 ways to reset any user password
[pat grade B question bank] complete summary
Hello go (XIV). Go language common standard library IV
The maximum (minimum, latest and top n) records are taken for MySQL grouping
7-2 h0107. Pig-Latin
GB gb28181 protocol video platform easygbs adds or deletes offline channels
There are three standards and three methods, i.e. fast growth and quick realization. How to choose the direction for making short videos of we media?
Secret comment-----
vulhub
Winter vacation daily question 2022 [week1 not finished]
测试基础之:黑盒测试
密评-----
網絡安全威脅情報體系
Hello go (XIII). Go language common standard library III
聚类方法汇总
"College entrance examination" volume sent to the big model: 442 people put forward 204 tasks to the big model, led by Google