Android Open Source - PocketLantern P L Preference Activity






From Project

Back to project page PocketLantern.

License

The source code is released under:

GNU General Public License

If you think the Android project PocketLantern 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 cc.co.techzealous.pl;
/*from  w ww. j  a  va 2s  . c  o m*/
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

public class PLPreferenceActivity extends PreferenceActivity {

  private Preference preferenceBrithness;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.preferences);
    
    preferenceBrithness = (Preference) findPreference(getResources().getString(R.string.pref_key_screenbraithness));
    preferenceBrithness.setOnPreferenceClickListener(new OnPreferenceClickListener() {
      @Override
      public boolean onPreferenceClick(Preference preference) {
        Intent i = new Intent(android.provider.Settings.ACTION_DISPLAY_SETTINGS);
        startActivity(i);
        return false;
      }
    });
  }
}




Java Source Code List

cc.co.techzealous.pl.MainActivity.java
cc.co.techzealous.pl.PLEulaActivity.java
cc.co.techzealous.pl.PLPreferenceActivity.java
cc.co.techzealous.pl.PLSizeActivity.java
cc.co.techzealous.pl.utils.MyView.java
cc.co.techzealous.pl.utils.PLConstants.java