Ejemplo n.º 1
0
  protected void onDestroy() {
    super.onDestroy();

    Config.mainInstance.finish();
    Intent it = new Intent(this, MainActivity.class);
    startActivity(it);
  }
Ejemplo n.º 2
0
 /**
  * When the back button is pressed, update the MidiOptions. Return the updated options as the
  * 'result' of this Activity.
  */
 @Override
 public void onBackPressed() {
   Intent intent = new Intent();
   updateOptions();
   intent.putExtra(SettingsActivity.settingsID, options);
   setResult(Activity.RESULT_OK, intent);
   super.onBackPressed();
 }
Ejemplo n.º 3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   addPreferencesFromResource(R.xml.preferences);
   File speech = new File(Config.SPEECH_PATH.concat("/A"));
   if (speech.exists() == false) {
     Preference pSpeech = findPreference("auto_speech");
     pSpeech.setEnabled(false);
   }
 }
Ejemplo n.º 4
0
  /**
   * Create the Settings activity. Retrieve the initial option values (MidiOptions) from the Intent.
   */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setTheme(android.R.style.Theme_Holo_Light);
    getWindow().getDecorView().setBackgroundColor(Color.WHITE);

    // getListView().setBackgroundColor(Color.TRANSPARENT);
    // getListView().setCacheColorHint(Color.TRANSPARENT);
    setTitle("ECML: Settings");
    options = (MidiOptions) this.getIntent().getSerializableExtra(settingsID);
    defaultOptions = (MidiOptions) this.getIntent().getSerializableExtra(defaultSettingsID);
    createView();
  }