Replace deprecated ProgressDialog with modern AlertDialog - #6873
Replace deprecated ProgressDialog with modern AlertDialog#6873Roniscend wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces deprecated android.app.ProgressDialog usages with a custom progress UI built on androidx.appcompat.app.AlertDialog, aligning the app with modern Android APIs and addressing #3487.
Changes:
- Added a reusable
DialogUtil.createProgressDialog(...)helper that shows an indeterminateProgressBarwith a message. - Migrated multiple Activities/Fragments from
ProgressDialogto the newAlertDialog-based progress dialog. - Introduced a new localized string for “Saving in progress…” and wired it into Nearby export flows.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Adds saving_in_progress string used by Nearby export progress UI. |
| app/src/main/java/fr/free/nrw/commons/utils/ImageUtils.kt | Replaces avatar progress ProgressDialog with AlertDialog created via DialogUtil. |
| app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.kt | Adds createProgressDialog(...) helper building an AppCompat AlertDialog with a ProgressBar. |
| app/src/main/java/fr/free/nrw/commons/upload/depicts/DepictsFragment.kt | Replaces depicts progress ProgressDialog with new DialogUtil progress dialog. |
| app/src/main/java/fr/free/nrw/commons/upload/categories/UploadCategoriesFragment.kt | Replaces categories progress ProgressDialog with new DialogUtil progress dialog. |
| app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.kt | Replaces upload progress ProgressDialog initialization with new DialogUtil progress dialog. |
| app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.kt | Uses new DialogUtil progress dialog during GPX/KML export. |
| app/src/main/java/fr/free/nrw/commons/description/DescriptionEditActivity.kt | Replaces caption/description update ProgressDialog with new DialogUtil progress dialog. |
| app/src/main/java/fr/free/nrw/commons/auth/LoginActivity.kt | Replaces login ProgressDialog with new DialogUtil progress dialog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c87a79c to
4caa692
Compare
4caa692 to
0daa4de
Compare
|
✅ Generated APK variants! |
|
@nicolas-raoul can you review this pr also apologies for accidentally closing and reopening this pull request while managing multiple branches in my fork. |
|
Checked the |
Description (required)
Replacing all deprecated instances of android.app.ProgressDialog across the app with a modern AlertDialog
Fixes #3487
Tests performed (required)
Tested on Pixel 9 6.5.0-debug (Android16)