Re-enable view prefetching.

This commit is contained in:
Greyson Parrelli
2020-06-30 11:55:06 -07:00
parent eafccc5721
commit 4ea8bac10d
3 changed files with 14 additions and 2 deletions

View File

@@ -17,11 +17,21 @@ public class DynamicTheme {
public static final String LIGHT = "light";
public static final String SYSTEM = "system";
private static boolean isDarkTheme;
private int currentTheme;
public void onCreate(Activity activity) {
boolean wasDarkTheme = isDarkTheme;
currentTheme = getSelectedTheme(activity);
isDarkTheme = isDarkTheme(activity);
activity.setTheme(currentTheme);
if (isDarkTheme != wasDarkTheme) {
CachedInflater.from(activity).clear();
}
}
public void onResume(Activity activity) {