Issue #3428: Swapped text in dialog buttons (#3496)

* Issue #3428: Swapped text in dialog buttons because, according to Android Convention, they were opposite each other

* Fixed Issue #3428 so it actually works correctly now: Swapped text in dialog buttons because, according to Android Convention, they were opposite each other

* Made sure that all of the places where the two types of showAlertDialog accurately match up with the new position of positive and negative text on the dialog box
Also removed occurences of empty lambda expressions and used null instead

* modified deletThisPicture to be accurate lambda call

* reverted mistake where ellipses replaced the three dots
This commit is contained in:
Fawziyah Alebiosu 2020-03-20 03:26:34 -04:00 committed by GitHub
parent d028cf189c
commit d3bc0721c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 13 deletions

View file

@ -445,8 +445,8 @@ public class ContributionsFragment
DialogUtil.showAlertDialog(getActivity(),
getString(R.string.nearby_card_permission_title),
getString(R.string.nearby_card_permission_explanation),
this::displayYouWontSeeNearbyMessage,
this::requestLocationPermission,
this::displayYouWontSeeNearbyMessage,
checkBoxView,
false);
}

View file

@ -151,7 +151,8 @@ public class QuizChecker {
activity.getString(R.string.quiz_alert_message, REVERT_PERCENTAGE_FOR_MESSAGE),
activity.getString(R.string.about_translate_proceed),
activity.getString(android.R.string.cancel),
() -> startQuizActivity(activity), null);
() -> startQuizActivity(activity),
null);
}
private void startQuizActivity(Activity activity) {

View file

@ -167,10 +167,11 @@ public class UploadCategoriesFragment extends UploadBaseFragment implements Cate
DialogUtil.showAlertDialog(getActivity(),
getString(R.string.no_categories_selected),
getString(R.string.no_categories_selected_warning_desc),
getString(R.string.no_go_back),
getString(R.string.yes_submit),
null,
() -> goToNextScreen());
getString(R.string.no_go_back),
() -> goToNextScreen(),
null);
}
@Override

View file

@ -354,13 +354,11 @@ public class UploadMediaDetailFragment extends UploadBaseFragment implements
String.format(Locale.getDefault(),
uploadTitleFormat,
uploadItem.getFileName()),
() -> {
},
() -> {
uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP);
onNextButtonClicked();
});
}, null);
}
@Override
@ -370,11 +368,12 @@ public class UploadMediaDetailFragment extends UploadBaseFragment implements
DialogUtil.showAlertDialog(getActivity(),
getString(R.string.warning),
errorMessageForResult,
() -> deleteThisPicture(),
() -> {
uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP);
onNextButtonClicked();
});
},
() -> deleteThisPicture()
);
}
//If the error message is null, we will probably not show anything
}

View file

@ -44,8 +44,8 @@ public class DialogUtil {
showAlertDialog(activity,
title,
message,
activity.getString(R.string.no),
activity.getString(R.string.yes),
activity.getString(R.string.no),
onPositiveBtnClick,
onNegativeBtnClick);
}
@ -96,8 +96,8 @@ public class DialogUtil {
showAlertDialog(activity,
title,
message,
activity.getString(R.string.no),
activity.getString(R.string.yes),
activity.getString(R.string.no),
onPositiveBtnClick,
onNegativeBtnClick,
customView,