Back to project page NotesTrainer.
The source code is released under:
GNU General Public License
If you think the Android project NotesTrainer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ydirson.notestrainer; /*ww w .jav a 2 s. co m*/ import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; public class Globals { static String[] displayedNoteNames; // constants public static final String[] noteNames = new String[] { "A", "B", "C", "D", "E", "F", "G" }; public static final String[] noteNames_latin = new String[] { "la", "si", "do", "re", "mi", "fa", "sol" }; public static final String[] noteNames_german = new String[] { "A", "H", "C", "D", "E", "F", "G" }; public static void init(Context context) { // notation to use SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); String notation = sharedPrefs.getString("pref_notation", "english"); if (notation.equals("english")) displayedNoteNames = noteNames; else if (notation.equals("latin")) displayedNoteNames = noteNames_latin; else if (notation.equals("german")) displayedNoteNames = noteNames_german; // else FIXME } }