Back to project page PocketLantern.
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.
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(); } }); } }