use of com.android.launcher3.uioverrides.WallpaperColorInfo in project Neo-Launcher by NeoApplications.
the class ColorScrim method createExtractedColorScrim.
public static ColorScrim createExtractedColorScrim(View view) {
WallpaperColorInfo colors = WallpaperColorInfo.getInstance(view.getContext());
int alpha = view.getResources().getInteger(R.integer.extracted_color_gradient_alpha);
ColorScrim scrim = new ColorScrim(view, ColorUtils.setAlphaComponent(colors.getSecondaryColor(), alpha), Interpolators.LINEAR);
scrim.attach();
return scrim;
}
use of com.android.launcher3.uioverrides.WallpaperColorInfo in project android_packages_apps_Trebuchet by LineageOS.
the class BaseWidgetSheet method getScrimColor.
protected int getScrimColor(Context context) {
WallpaperColorInfo colors = WallpaperColorInfo.INSTANCE.get(context);
int alpha = context.getResources().getInteger(R.integer.extracted_color_gradient_alpha);
return setColorAlphaBound(colors.getSecondaryColor(), alpha);
}
use of com.android.launcher3.uioverrides.WallpaperColorInfo in project android_packages_apps_Trebuchet by LineageOS.
the class Themes method getActivityThemeRes.
public static int getActivityThemeRes(Context context) {
WallpaperColorInfo wallpaperColorInfo = WallpaperColorInfo.INSTANCE.get(context);
boolean darkTheme;
if (Utilities.ATLEAST_Q) {
Configuration configuration = context.getResources().getConfiguration();
int nightMode = configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK;
darkTheme = nightMode == Configuration.UI_MODE_NIGHT_YES;
} else {
darkTheme = wallpaperColorInfo.isDark();
}
if (darkTheme) {
return wallpaperColorInfo.supportsDarkText() ? R.style.AppTheme_Dark_DarkText : wallpaperColorInfo.isMainColorDark() ? R.style.AppTheme_Dark_DarkMainColor : R.style.AppTheme_Dark;
} else {
return wallpaperColorInfo.supportsDarkText() ? R.style.AppTheme_DarkText : wallpaperColorInfo.isMainColorDark() ? R.style.AppTheme_DarkMainColor : R.style.AppTheme;
}
}
Aggregations