mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-03-06 15:30:32 +00:00
Improve button positioning
- Keeps similar consistent locations as prior menus - Remove cancel no-op buttons
This commit is contained in:
parent
dfc09e87bb
commit
1e986d73ef
@ -428,12 +428,6 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
|||||||
final RadioButton readWrite = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_readWrite);
|
final RadioButton readWrite = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_readWrite);
|
||||||
readWrite.setChecked(!roChecked);
|
readWrite.setChecked(!roChecked);
|
||||||
|
|
||||||
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
dialog.dismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
@ -267,7 +267,7 @@ public class Apple2MainMenu {
|
|||||||
final RadioButton noAppleSelected = (RadioButton) resetConfirmationView.findViewById(R.id.radioButton_noApple);
|
final RadioButton noAppleSelected = (RadioButton) resetConfirmationView.findViewById(R.id.radioButton_noApple);
|
||||||
noAppleSelected.setChecked(false);
|
noAppleSelected.setChecked(false);
|
||||||
|
|
||||||
AlertDialog rebootQuitDialog = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.quit_reboot).setMessage(R.string.quit_reboot_choice).setView(resetConfirmationView).setPositiveButton(R.string.reset, new DialogInterface.OnClickListener() {
|
AlertDialog rebootQuitDialog = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.quit_reboot).setMessage(R.string.quit_reboot_choice).setView(resetConfirmationView).setNeutralButton(R.string.reset, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
||||||
@ -283,7 +283,7 @@ public class Apple2MainMenu {
|
|||||||
mActivity.rebootEmulation(resetState);
|
mActivity.rebootEmulation(resetState);
|
||||||
Apple2MainMenu.this.dismiss();
|
Apple2MainMenu.this.dismiss();
|
||||||
}
|
}
|
||||||
}).setNeutralButton(R.string.quit, new DialogInterface.OnClickListener() {
|
}).setPositiveButton(R.string.quit, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
||||||
@ -292,7 +292,7 @@ public class Apple2MainMenu {
|
|||||||
}
|
}
|
||||||
mActivity.quitEmulator();
|
mActivity.quitEmulator();
|
||||||
}
|
}
|
||||||
}).setNegativeButton(R.string.cancel, null).create();
|
}).create();
|
||||||
|
|
||||||
mActivity.registerAndShowDialog(rebootQuitDialog);
|
mActivity.registerAndShowDialog(rebootQuitDialog);
|
||||||
}
|
}
|
||||||
@ -435,7 +435,7 @@ public class Apple2MainMenu {
|
|||||||
|
|
||||||
final AtomicBoolean selectionAlreadyHandled = new AtomicBoolean(false);
|
final AtomicBoolean selectionAlreadyHandled = new AtomicBoolean(false);
|
||||||
|
|
||||||
AlertDialog saveRestoreDialog = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.saverestore).setMessage(R.string.saverestore_choice).setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
|
AlertDialog saveRestoreDialog = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.saverestore).setMessage(R.string.saverestore_choice).setNeutralButton(R.string.save, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
||||||
@ -447,7 +447,7 @@ public class Apple2MainMenu {
|
|||||||
mActivity.saveState(jsonString);
|
mActivity.saveState(jsonString);
|
||||||
Apple2MainMenu.this.dismiss();
|
Apple2MainMenu.this.dismiss();
|
||||||
}
|
}
|
||||||
}).setNeutralButton(R.string.restore, new DialogInterface.OnClickListener() {
|
}).setPositiveButton(R.string.restore, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ public class Apple2MainMenu {
|
|||||||
}
|
}
|
||||||
Apple2MainMenu.this.dismiss();
|
Apple2MainMenu.this.dismiss();
|
||||||
}
|
}
|
||||||
}).setNegativeButton(R.string.cancel, null).create();
|
}).create();
|
||||||
|
|
||||||
mActivity.registerAndShowDialog(saveRestoreDialog);
|
mActivity.registerAndShowDialog(saveRestoreDialog);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user