mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-02 08:57:40 +08:00
优化:统一管理自定义模板可用变量标签插入按钮 #559
This commit is contained in:
parent
0a3f9f53f1
commit
2a910fe504
@ -382,7 +382,7 @@ class CommonUtils private constructor() {
|
||||
// 遍历所有按钮数据,过滤掉需要排除的按钮
|
||||
allButtons.forEach { (tag, lable) ->
|
||||
if (excludeSet.isNotEmpty() && excludeSet.contains(tag)) {
|
||||
allButtons.remove(tag)
|
||||
return@forEach
|
||||
}
|
||||
|
||||
val button = TextView(context).apply {
|
||||
|
20
app/src/main/res/drawable/rounded_button.xml
Normal file
20
app/src/main/res/drawable/rounded_button.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 按下时的背景 -->
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="#1E88E5" /> <!-- 按下时的深蓝背景色 -->
|
||||
<corners android:radius="3dp" /> <!-- 圆角半径 -->
|
||||
<stroke android:width="1dp" android:color="#1565C0" /> <!-- 边框深蓝色 -->
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 默认背景 -->
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="#2196F3" /> <!-- 默认浅蓝背景色 -->
|
||||
<corners android:radius="3dp" /> <!-- 圆角半径 -->
|
||||
<stroke android:width="1dp" android:color="#1E88E5" /> <!-- 边框蓝色 -->
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
Loading…
x
Reference in New Issue
Block a user