Skip to content

Commit

Permalink
Fix pressing complete scenario when focus hasn't changed from xp/gold.
Browse files Browse the repository at this point in the history
Fix yes/no/cancel button for save changes warning
  • Loading branch information
North101 committed Feb 24, 2018
1 parent 8e5491f commit 9b4e8db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public boolean onBackPressed() {

AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle("Would you like to save your changes?")
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
saveCharacter(new Runnable() {
@Override
Expand All @@ -153,12 +153,12 @@ public void run() {
});
}
})
.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
getFragmentManager().popBackStack();
}
})
.setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
.setNeutralButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ public void onPause() {

@OptionsItem(R.id.complete)
void onCompleteClick() {
parseXPText();
parseGoldText();

Intent intent = new Intent();
intent.putExtra("xp", characterTracker.getXp());
intent.putExtra("gold", characterTracker.getGold());
Expand Down

0 comments on commit 9b4e8db

Please sign in to comment.