mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-31 14:06:10 +00:00
Add light and dark spinner lotties with correct coloring.
This commit is contained in:
committed by
Greyson Parrelli
parent
fbfa3abffd
commit
0bb9c1d650
@@ -25,6 +25,17 @@ public class ThemeUtil {
|
||||
return getAttribute(context, R.attr.theme_type, "light").equals("dark");
|
||||
}
|
||||
|
||||
public static int getThemedResourceId(@NonNull Context context, @AttrRes int attr) {
|
||||
TypedValue typedValue = new TypedValue();
|
||||
Resources.Theme theme = context.getTheme();
|
||||
|
||||
if (theme.resolveAttribute(attr, typedValue, true)) {
|
||||
return typedValue.resourceId;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static boolean getThemedBoolean(@NonNull Context context, @AttrRes int attr) {
|
||||
TypedValue typedValue = new TypedValue();
|
||||
Resources.Theme theme = context.getTheme();
|
||||
|
||||
Reference in New Issue
Block a user