/** * 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(); }
/** * 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(); }