The ExerciseSet can now be chosen in the TimerActivity. The splash screen as well as the tutorial have been built in. The navigation drawer is now functional. You can now create and delete exercise sets via the ManageExerciseSetsActivity. Started building the EditExerciseSetActivity, where should be able to edit an exercise set.
This commit is contained in:
parent
0d7b3a52fc
commit
73d454eb96
132 changed files with 2747 additions and 457 deletions
|
|
@ -0,0 +1,30 @@
|
|||
package org.secuso.privacyfriendlybreakreminder;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* This class saves the available languages for the exercises.
|
||||
* @author Christopher Beckmann
|
||||
*/
|
||||
public class ExerciseLocale {
|
||||
|
||||
private static final HashSet<String> AVAILABLE_LOCALE = new HashSet<>();
|
||||
|
||||
static {
|
||||
AVAILABLE_LOCALE.addAll(
|
||||
Arrays.asList(
|
||||
"en", "de"
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @return the available language. If the default language of the device is not available. {@code "en"} will be returned.
|
||||
*/
|
||||
public static String getLocale() {
|
||||
String locale = Locale.getDefault().getLanguage();
|
||||
return AVAILABLE_LOCALE.contains(locale) ? locale : "en";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue