summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/util/Themes.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/util/Themes.java')
-rw-r--r--src/com/android/launcher3/util/Themes.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher3/util/Themes.java b/src/com/android/launcher3/util/Themes.java
index d22509344..5f965a341 100644
--- a/src/com/android/launcher3/util/Themes.java
+++ b/src/com/android/launcher3/util/Themes.java
@@ -52,6 +52,13 @@ public class Themes {
return value;
}
+ public static int getAttrInteger(Context context, int attr) {
+ TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
+ int value = ta.getInteger(0, 0);
+ ta.recycle();
+ return value;
+ }
+
/**
* Returns the alpha corresponding to the theme attribute {@param attr}, in the range [0, 255].
*/