mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-27 01:06:14 +00:00
Add support for different card background colors Add minor bug fixes Add minor fixes Fix minor bugs where action mode kept active
23 lines
567 B
Java
23 lines
567 B
Java
package com.beemdevelopment.aegis.helpers;
|
|
|
|
import android.content.res.Resources;
|
|
import android.graphics.Color;
|
|
import android.util.TypedValue;
|
|
|
|
import androidx.annotation.ColorInt;
|
|
|
|
import com.beemdevelopment.aegis.R;
|
|
|
|
public class ThemeHelper {
|
|
private ThemeHelper() {
|
|
|
|
}
|
|
|
|
public static int getThemeColor(int attributeId, Resources.Theme currentTheme) {
|
|
TypedValue typedValue = new TypedValue();
|
|
currentTheme.resolveAttribute(attributeId, typedValue, true);
|
|
@ColorInt int color = typedValue.data;
|
|
|
|
return color;
|
|
}
|
|
}
|