|
|
|
@ -28,6 +28,8 @@ import org.isoron.uhabits.*;
|
|
|
|
|
|
|
|
|
|
public class StyledResources
|
|
|
|
|
{
|
|
|
|
|
private static Integer fixedTheme;
|
|
|
|
|
|
|
|
|
|
private final Context context;
|
|
|
|
|
|
|
|
|
|
public StyledResources(@NonNull Context context)
|
|
|
|
@ -35,6 +37,11 @@ public class StyledResources
|
|
|
|
|
this.context = context;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void setFixedTheme(Integer theme)
|
|
|
|
|
{
|
|
|
|
|
fixedTheme = theme;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean getBoolean(@AttrRes int attrId)
|
|
|
|
|
{
|
|
|
|
|
TypedArray ta = getTypedArray(attrId);
|
|
|
|
@ -92,9 +99,8 @@ public class StyledResources
|
|
|
|
|
{
|
|
|
|
|
int[] attrs = new int[]{ attrId };
|
|
|
|
|
|
|
|
|
|
// Integer fixedTheme = ThemeSwitcher.fixedTheme;
|
|
|
|
|
// if (fixedTheme != null)
|
|
|
|
|
// return context.getTheme().obtainStyledAttributes(fixedTheme, attrs);
|
|
|
|
|
if (fixedTheme != null)
|
|
|
|
|
return context.getTheme().obtainStyledAttributes(fixedTheme, attrs);
|
|
|
|
|
|
|
|
|
|
return context.obtainStyledAttributes(attrs);
|
|
|
|
|
}
|
|
|
|
|