Add ability to translate themes and viewmodes

Closes #50
This commit is contained in:
Michael Schättgen 2019-04-09 17:53:10 +02:00
parent 1ac42d85d6
commit b41e328d22
5 changed files with 55 additions and 15 deletions

View file

@ -17,16 +17,16 @@ public enum Theme {
return null;
}
public static String getThemeName(int x) {
public static int getThemeNameResource(int x) {
switch (x) {
case 0:
return "Light theme";
return R.string.light_theme_title;
case 1:
return "Dark theme";
return R.string.dark_theme_title;
case 2:
return "Amoled theme";
return R.string.amoled_theme_title;
}
return null;
return R.string.light_theme_title;
}
public static String[] getThemeNames() {
@ -36,4 +36,12 @@ public enum 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
};
}
}