Android Open Source - stripepaper My Preferences Activity






From Project

Back to project page stripepaper.

License

The source code is released under:

MIT License

If you think the Android project stripepaper 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 com.tjm.stripepaper;
/*w ww.  j a  v a  2 s.c  o  m*/
import android.content.SharedPreferences;
import android.graphics.Canvas;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.util.Log;

public class MyPreferencesActivity extends PreferenceActivity {

    SharedPreferences.OnSharedPreferenceChangeListener spChanged = new
            SharedPreferences.OnSharedPreferenceChangeListener() {
                @Override
                public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {
                    if(MyWallpaperService.INSTANCE != null) {
                        MyWallpaperService.INSTANCE.onVisibilityChanged(true);
                    }
                }
            };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.prefs);
        getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(spChanged);
    }
}




Java Source Code List

com.tjm.stripepaper.MyPreferencesActivity.java
com.tjm.stripepaper.MyWallpaperService.java
com.tjm.stripepaper.SetWallpaperActivity.java
com.tjm.stripepaper.Stripe.java