Questions tagged [progressdialog]

An Android dialog that displays a progress wheel or progress bar. Because it's an extension of the AlertDialog, it also supports buttons.

1832 questions
242
votes
18 answers

ProgressDialog is deprecated.What is the alternate one to use?

I have come across to see that ProgressDialog is now deprecated. What would be alternate one to use in place of that apart from ProgressBar. I am using android studio version 2.3.3. ProgressDialog progressDialog=new…
Sunil P
  • 3,283
  • 2
  • 10
  • 19
134
votes
8 answers

Custom Drawable for ProgressBar/ProgressDialog

Reading the limited documentation that Google has provided, I get the feeling that it is possible to change the look (drawable) of a ProgressBar/ProgressDialog by simply creating a new style an assigning it to the style property of the ProgressBar.…
Sam
  • 2,343
  • 3
  • 17
  • 23
110
votes
18 answers

Android: ProgressDialog.show() crashes with getApplicationContext

I can't seem to grasp why this is happening. This code: mProgressDialog = ProgressDialog.show(this, "", getString(R.string.loading), true); works just fine. However, this code: mProgressDialog = ProgressDialog.show(getApplicationContext(), "",…
Felix
  • 84,032
  • 41
  • 145
  • 163
92
votes
5 answers

What does the 'indeterminate' mean in ProgressDialog?

Maybe my English is poor but I really cannot figure out what the "indeterminate" means in this context: Android Development → ProgressDialog.isIndeterminate()
David S.
  • 9,721
  • 9
  • 53
  • 95
86
votes
12 answers

Android Fragments. Retaining an AsyncTask during screen rotation or configuration change

I'm working on a Smartphone / Tablet app, using only one APK, and loading resources as is needed depending on screen size, the best design choice seemed to be using Fragments via the ACL. This app has been working fine until now being only activity…
78
votes
5 answers

Show ProgressDialog Android

I have an EditText which takes a String from the user and a searchButton. When the searchButton is clicked, it will search through the XML file and display it in the ListView. I am able to take input from the user, search through the XML file and…
captaindroid
  • 2,645
  • 6
  • 28
  • 43
78
votes
4 answers

Can't create handler inside thread that has not called Looper.prepare() inside AsyncTask for ProgressDialog

I don't understand why I'm getting this error. I'm using AsyncTask to run some processes in the background. I have: protected void onPreExecute() { connectionProgressDialog = new ProgressDialog(SetPreference.this); …
mlevit
  • 2,586
  • 8
  • 40
  • 49
64
votes
7 answers

ProgressDialog in AsyncTask

I'm trying to display a custom progressdialog while loading RSS feed from an HTTP server, I made a hard search, but nothing helped me to do this, the only thing I know is that the solution should use AsyncTask, but I'm confusing about the params to…
Houssem
  • 2,029
  • 3
  • 26
  • 40
62
votes
8 answers

How to center progress indicator in ProgressDialog easily (when no title/text passed along)

When calling progressDialog = ProgressDialog.show(this, null, null, true); usually the developers wants to only show the progress indication image, and usually would it expect to be centered within the window (at least from regular UI design point…
Mathias Conradt
  • 27,904
  • 20
  • 132
  • 186
60
votes
16 answers

How to show progress dialog in Android?

I want to show ProgressDialog when I click on Login button and it takes time to move to another page. How can I do this?
user1285707
57
votes
6 answers

Android: "BadTokenException: Unable to add window; is your activity running?" at showing dialog in PreferenceActivity

I'd like to ask for some help: In my app, I have only one activity, a PreferenceActivity (don't need other, it's just a simple background-sync app, so the PrefsActivity is the Main/Launcher). After the user setup preferences, checks a…
Lama
  • 1,293
  • 3
  • 11
  • 10
56
votes
8 answers

Add a Progress Bar in WebView

I am trying to add a progress/loading bar to my application that uses WebView. I am confused on how to implement a progress bar that appears every time a link is clicked. Current code: public class CULearnBrowser extends Activity { WebView…
Sean
  • 807
  • 1
  • 11
  • 20
52
votes
3 answers

Android: How to prevent the back button from cancelling a DialogFragment

I have a Fragment that can create and pop up a DialogFragment, but when I hit the back button, it dismisses the dialog even though I explicitly call setCancelable(false); Is there any way for my DialogFragment to be insensative to the back…
MattF
  • 1,425
  • 3
  • 16
  • 18
48
votes
11 answers

ProgressDialog : how to prevent Leaked Window

I'm using ProgressDialog to prevent the user from interacting while the device is downloading stuff from internet. everything was working fine until my client managed to produce this bug : "07-06 17:10:50.363: ERROR/WindowManager(8821): Activity…
Jason Rogers
  • 18,658
  • 25
  • 74
  • 110
41
votes
4 answers

Prevent ProgressDialog from being dismissed when I click the search button (Android)

In a long-running operation, I'm showing a popup dialog (created from ProgressDialog to prevent other operations from happening). I have made it non-cancellable with setCancelable(false), so I can't close it using the back button, but surprisingly,…
Randy Sugianto 'Yuku'
  • 64,635
  • 54
  • 168
  • 216
1
2 3
99 100