What does the ‘indeterminate’ mean in ProgressDialog?
It means the “loading amount” is not measured.
It means the “loading amount” is not measured.
I am using Android version 2.1 with API Level 7. I faced with this (or similar) problem and solved by using this: Dialog dialog = new Dialog(this); instead of this: Dialog dialog = new Dialog(getApplicationContext());
I used the following for creating a custom progress bar. File res/drawable/progress_bar_states.xml declares the colors of the different states: <layer-list xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:id=”@android:id/background”> <shape> <gradient android:startColor=”#000001″ android:centerColor=”#0b131e” android:centerY=”0.75″ android:endColor=”#0d1522″ android:angle=”270″ /> </shape> </item> <item android:id=”@android:id/secondaryProgress”> <clip> <shape> <gradient android:startColor=”#234″ android:centerColor=”#234″ android:centerY=”0.75″ android:endColor=”#a24″ android:angle=”270″ /> </shape> </clip> </item> <item android:id=”@android:id/progress”> <clip> <shape> <gradient android:startColor=”#144281″ android:centerColor=”#0b1f3c” android:centerY=”0.75″ … Read more
Yes, in API level 26 it’s deprecated. Instead, you can use progressBar. To create it programmatically: First get a reference to the root layout RelativeLayout layout = findViewById(R.id.display); //specify here Root layout Id or RelativeLayout layout = findViewById(this); Then add the progress bar progressBar = new ProgressBar(youractivity.this, null, android.R.attr.progressBarStyleLarge); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(100, 100); … Read more