feat: 增强BackgroundUtils属性获取功能

- 新增 getAttributeValueType() 函数,返回当前属性值类型
- 新增 getResId() 和 getColor() 公共函数,用于获取具体的属性值
This commit is contained in:
2026-05-02 10:15:03 +08:00
parent 0786d69ad6
commit aea9f1d745

View File

@@ -93,6 +93,18 @@ public class BackgroundUtils {
return drawableType;
}
public DrawableType getAttributeValueType() {
return drawableType;
}
public int getResId() {
return resId;
}
public int getColor() {
return color;
}
public void saveToPreferences() {
if (context == null) return;
SharedPreferences prefs = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);