From 4d2089c58ad0928a86d700ffed95f780bbf37646 Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Thu, 29 Jun 2017 13:12:17 -0700 Subject: [PATCH] docs: Described why ProgressDialog is now deprecated. Per feedback from DevRel, devs should avoid ProgressDialog because using a modal dialog to show progress is a bad user experience. Updating the ProgressDialog javadocs to say this; there's a separate CL (http://cr/160568896) to make a similar note in the Dialogs API guide. Doc is staged to: http://go/dac-stage/reference/android/app/ProgressDialog.html Test: make ds-docs Bug: 37565313 Change-Id: I189732fdda4532f248861e3f3d077f743f6387de --- core/java/android/app/ProgressDialog.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/ProgressDialog.java b/core/java/android/app/ProgressDialog.java index 8ec9622ebe341..8a083ebcd7e99 100644 --- a/core/java/android/app/ProgressDialog.java +++ b/core/java/android/app/ProgressDialog.java @@ -42,8 +42,12 @@ import java.text.NumberFormat; * *

The progress range is 0 to {@link #getMax() max}.

* - * @deprecated Use a progress indicator such as ProgressBar inline inside of - * an activity rather than using this modal dialog. + * @deprecated ProgressDialog is a modal dialog, which prevents the + * user from interacting with the app. Instead of using this class, you should + * use a progress indicator like {@link android.widget.ProgressBar}, which can + * be embedded in your app's UI. Alternatively, you can use a + * notification + * to inform the user of the task's progress. */ @Deprecated public class ProgressDialog extends AlertDialog {