Android Open Source - ShortcutsOfPower_Android S O P Eula






From Project

Back to project page ShortcutsOfPower_Android.

License

The source code is released under:

GNU General Public License

If you think the Android project ShortcutsOfPower_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.

Java Source Code

package com.networkprofiles;
/*w w  w  .j a va  2s .c  om*/
import com.networkprofiles.utils.ConstantsNP;

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;

public class SOPEula extends Activity {

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




Java Source Code List

com.networkprofiles.MainNP.java
com.networkprofiles.SOPEula.java
com.networkprofiles.utils.ConstantsNP.java
com.networkprofiles.utils.MyNetControll.java
com.networkprofiles.utils.NPReceiver.java
com.networkprofiles.widget.NPWidgetCell.java
com.networkprofiles.widget.NPWidgetDisplay.java
com.networkprofiles.widget.NPWidgetGps.java
com.networkprofiles.widget.NPWidgetMobileData.java
com.networkprofiles.widget.NPWidgetService.java
com.networkprofiles.widget.NPWidgetSound.java