Android Open Source - NotesTrainer Globals






From Project

Back to project page NotesTrainer.

License

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.

Java Source Code

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
    }
}




Java Source Code List

com.robobunny.SeekBarPreference.java
ydirson.notestrainer.Globals.java
ydirson.notestrainer.MainMenu.java
ydirson.notestrainer.NoteSeekBarPreference.java
ydirson.notestrainer.Prefs.java
ydirson.notestrainer.ReadNotes.java
ydirson.notestrainer.ScoreView.java