Aegis/app/src/main/java/com/beemdevelopment/aegis/Theme.java

48 lines
1.1 KiB
Java
Raw Normal View History

package com.beemdevelopment.aegis;
public enum Theme {
LIGHT,
DARK,
AMOLED;
public static Theme fromInteger(int x) {
switch (x) {
case 0:
return LIGHT;
case 1:
return DARK;
case 2:
return AMOLED;
}
return null;
}
2019-03-28 01:27:07 +01:00
public static int getThemeNameResource(int x) {
switch (x) {
2019-03-28 01:27:07 +01:00
case 0:
return R.string.light_theme_title;
2019-03-28 01:27:07 +01:00
case 1:
return R.string.dark_theme_title;
2019-03-28 01:27:07 +01:00
case 2:
return R.string.amoled_theme_title;
2019-03-28 01:27:07 +01:00
}
return R.string.light_theme_title;
2019-03-28 01:27:07 +01:00
}
public static String[] getThemeNames() {
return new String[]{
2019-03-28 01:27:07 +01:00
"Light theme",
"Dark theme",
"Amoled theme"
};
}
public static int[] getThemeNameResources() {
return new int[] {
R.string.light_theme_title,
R.string.dark_theme_title,
R.string.amoled_theme_title
};
}
}