From aea9f1d745db3dd12862c567ba48e0e98054e063 Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Sat, 2 May 2026 10:15:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BABackgroundUtils?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=8E=B7=E5=8F=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 getAttributeValueType() 函数,返回当前属性值类型 - 新增 getResId() 和 getColor() 公共函数,用于获取具体的属性值 --- .../studio/gallery/utils/BackgroundUtils.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gallery/src/main/java/cc/winboll/studio/gallery/utils/BackgroundUtils.java b/gallery/src/main/java/cc/winboll/studio/gallery/utils/BackgroundUtils.java index bfcf1e3..1b526db 100644 --- a/gallery/src/main/java/cc/winboll/studio/gallery/utils/BackgroundUtils.java +++ b/gallery/src/main/java/cc/winboll/studio/gallery/utils/BackgroundUtils.java @@ -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);