Android Open Source - LyricHere Settings Fragment






From Project

Back to project page LyricHere.

License

The source code is released under:

Apache License

If you think the Android project LyricHere 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 cn.zhaiyifan.lyrichere.prefs;
// w  w w . j a va  2  s. c  o m
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;

import cn.zhaiyifan.lyrichere.R;

public class SettingsFragment extends PreferenceFragment implements OnSharedPreferenceChangeListener {
    private SharedPreferences prefs;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preference);
    }

    @Override
    public void onStart() {
        super.onStart();
        prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
        prefs.registerOnSharedPreferenceChangeListener(this);
    }

    /**
     * Called when a shared preference is changed, added, or removed. This
     * may be called even if a preference is set to its existing value.
     * <p/>
     * <p>This callback will be run on your main thread.
     *
     * @param sharedPreferences The {@link android.content.SharedPreferences} that received
     *                          the change.
     * @param key               The key of the preference that was changed, added, or
     */
    @Override
    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {

    }
}




Java Source Code List

cn.zhaiyifan.lyrichere.ApplicationTest.java
cn.zhaiyifan.lyrichere.Constants.java
cn.zhaiyifan.lyrichere.MusicBroadcastReceiver.java
cn.zhaiyifan.lyrichere.adapters.LyricCursorAdapter.java
cn.zhaiyifan.lyrichere.db.DbHelper.java
cn.zhaiyifan.lyrichere.db.LyricContentProvider.java
cn.zhaiyifan.lyrichere.model.Lyric.java
cn.zhaiyifan.lyrichere.prefs.SettingsActivity.java
cn.zhaiyifan.lyrichere.prefs.SettingsFragment.java
cn.zhaiyifan.lyrichere.prefs.colorpicker.AlphaPatternDrawable.java
cn.zhaiyifan.lyrichere.prefs.colorpicker.ColorPickerDialog.java
cn.zhaiyifan.lyrichere.prefs.colorpicker.ColorPickerPanelView.java
cn.zhaiyifan.lyrichere.prefs.colorpicker.ColorPickerPreference.java
cn.zhaiyifan.lyrichere.prefs.colorpicker.ColorPickerView.java
cn.zhaiyifan.lyrichere.prefs.colorpicker.Test.java
cn.zhaiyifan.lyrichere.ui.AboutActivity.java
cn.zhaiyifan.lyrichere.ui.DownloadFragment.java
cn.zhaiyifan.lyrichere.ui.ListScrollTextView.java
cn.zhaiyifan.lyrichere.ui.LyricExplorerActivity.java
cn.zhaiyifan.lyrichere.ui.LyricExplorerFragment.java
cn.zhaiyifan.lyrichere.ui.LyricPlayerActivity.java
cn.zhaiyifan.lyrichere.ui.LyricPlayerFragment.java
cn.zhaiyifan.lyrichere.ui.LyricSearchView.java
cn.zhaiyifan.lyrichere.ui.LyricView.java
cn.zhaiyifan.lyrichere.utils.DbUtils.java
cn.zhaiyifan.lyrichere.utils.FileUtils.java
cn.zhaiyifan.lyrichere.utils.LyricCache.java
cn.zhaiyifan.lyrichere.utils.LyricProvider.java
cn.zhaiyifan.lyrichere.utils.LyricUtils.java
cn.zhaiyifan.lyrichere.utils.Util.java
cn.zhaiyifan.lyrichere.workers.Finder.java
cn.zhaiyifan.lyrichere.workers.LyricEncodingUpdater.java
cn.zhaiyifan.lyrichere.workers.LyricLastVisitUpdater.java
cn.zhaiyifan.lyrichere.workers.LyricOpener.java