Android Open Source - PocketLantern P L Eula 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;
/*  w  w  w. ja v  a  2s  .  co  m*/
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import cc.co.techzealous.pl.utils.PLConstants;

public class PLEulaActivity extends Activity {

  private Button buttonEulaCancel;
  private Button buttonEulaOk;
  private SharedPreferences prefs;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.eulaactivity);
    
    prefs = PreferenceManager.getDefaultSharedPreferences(this);
    buttonEulaCancel = (Button) findViewById(R.id.buttonEulaCancel);
    buttonEulaOk = (Button) findViewById(R.id.buttonEulaOk);
    
    buttonEulaCancel.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        finish();
      }
    });
    
    buttonEulaOk.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        prefs.edit().putBoolean(PLConstants.PREF_EULA, true).commit();
        Intent i = new Intent(PLEulaActivity.this, MainActivity.class);
        startActivity(i);
        finish();
      }
    });
  }
}




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