Back to project page DialQuick_Android.
The source code is released under:
GNU General Public License
If you think the Android project DialQuick_Android 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 com.blogspot.techzealous.ui; //from w ww . j av a 2 s .c om 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 com.blogspot.techzealous.dialquick.DialQuickConstants; import com.blogspot.techzealous.dialquick.R; public class DQEula extends Activity { SharedPreferences prefs; Button buttonOk; Button buttonCancel; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); prefs = PreferenceManager.getDefaultSharedPreferences(this); if(prefs.getBoolean(DialQuickConstants.PREF_EULA, false)) { Intent i = new Intent(DQEula.this, MainActivity.class); startActivity(i); finish(); } setContentView(R.layout.dqeula); buttonOk = (Button) findViewById(R.id.buttonEulaOk); buttonCancel = (Button) findViewById(R.id.buttonEulaCancel); buttonOk.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { prefs.edit().putBoolean(DialQuickConstants.PREF_EULA, true).commit(); Intent i = new Intent(DQEula.this, MainActivity.class); startActivity(i); finish(); } }); buttonCancel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { finish(); } }); } }