Change splash screen preferences button to a reset-preferences button

- Reset should be the only thing potentially needed from the splash screen (and even then hopefully not).  The main
      preferences menus can be accessed after starting emulation via back button or top right touch menu
This commit is contained in:
Aaron Culliney 2016-04-17 18:13:26 -07:00
parent 7607126f7c
commit d416edc7d8
3 changed files with 18 additions and 9 deletions

View File

@ -11,7 +11,9 @@
package org.deadc0de.apple2ix;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
@ -44,12 +46,19 @@ public class Apple2SplashScreen implements Apple2MenuView {
}
});
Button prefsButton = (Button) mSettingsView.findViewById(R.id.prefsButton);
Button prefsButton = (Button) mSettingsView.findViewById(R.id.resetButton);
prefsButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Apple2SettingsMenu settingsMenu = mActivity.getSettingsMenu();
settingsMenu.show();
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.preferences_reset_really).setMessage(R.string.preferences_reset_warning).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
Apple2Preferences.reset(mActivity);
}
}).setNegativeButton(R.string.no, null);
AlertDialog dialog = builder.create();
mActivity.registerAndShowDialog(dialog);
}
});
@ -70,7 +79,7 @@ public class Apple2SplashScreen implements Apple2MenuView {
public void run() {
Button startButton = (Button) mSettingsView.findViewById(R.id.startButton);
startButton.setEnabled(mDismissable);
Button prefsButton = (Button) mSettingsView.findViewById(R.id.prefsButton);
Button prefsButton = (Button) mSettingsView.findViewById(R.id.resetButton);
prefsButton.setEnabled(mDismissable);
Button disksButton = (Button) mSettingsView.findViewById(R.id.disksButton);
disksButton.setEnabled(mDismissable);

View File

@ -45,8 +45,8 @@
<Button
android:layout_height="wrap_content"
android:layout_width="0dp"
android:text="@string/emulation_settings"
android:id="@+id/prefsButton"
android:text="@string/reset_preferences"
android:id="@+id/resetButton"
android:layout_marginTop="10dp"
android:layout_below="@+id/startButton"
android:layout_alignRight="@+id/startButton"
@ -60,7 +60,7 @@
android:text="@string/emulation_disks"
android:id="@+id/disksButton"
android:layout_marginTop="10dp"
android:layout_below="@+id/prefsButton"
android:layout_below="@+id/resetButton"
android:layout_alignRight="@+id/startButton"
android:layout_alignEnd="@+id/startButton"
android:layout_alignLeft="@+id/startButton"

View File

@ -41,8 +41,7 @@
<string name="disk_show_operation">Show Disk ][ operations</string>
<string name="disk_show_operation_summary">Shows when disk drives are reading or writing</string>
<string name="emulation_continue">Continue…</string>
<string name="emulation_settings">Settings…</string>
<string name="emulation_disks">Load disk image…</string>
<string name="emulation_disks">Load disk image</string>
<string name="header_disks">Insert disk:</string>
<string name="input_current">Current touch device</string>
<string name="input_current_summary">Choose current touch device</string>
@ -153,6 +152,7 @@
<string name="quit_reboot_choice">Reset/reboot or quit?</string>
<string name="reboot">Reboot</string>
<string name="reset">Reset</string>
<string name="reset_preferences">Reset settings</string>
<string name="reset_self_test">Self Test</string>
<string name="reset_soft">Soft</string>
<string name="restore">Quick restore</string>