Is there something else that should be called?
showDialog(TIME_DIALOG_ID);
It's in this tutorial but says deprecated in Eclipse.
"Deprecated" refers to functions or elements that are in the process of being replaced by newer ones. 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 ProgressBar , which can be embedded in your app's UI.
because It prevents the user to interact with the app. Let me explain to you why this is bad. As we show the Progress Dialog It runs and blocks the UI and user can't interact with the App.
Showing the DialogFragment It is not necessary to manually create a FragmentTransaction to display your DialogFragment . Instead, use the show() method to display your dialog. You can pass a reference to a FragmentManager and a String to use as a FragmentTransaction tag.
From http://developer.android.com/reference/android/app/Activity.html
public final void showDialog (int id) Added in API level 1
This method was deprecated in API level 13. Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package.
Simple version of showDialog(int, Bundle) that does not take any arguments. Simply calls showDialog(int, Bundle) with null arguments.
Why
How to solve?
More
From Activity#showDialog(int)
:
This method is deprecated.
Use the newDialogFragment
class withFragmentManager
instead; this is also available on older platforms through the Android compatibility package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With