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