navasmdc / MaterialDesignLibrary

This is a library with components of Android L to you use in android 2.2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add circular indeterminate to progressDialog

opened this issue · comments

How could add circular indeterminate to progressDialog?

Hi, you can try this code:

ProgressDialog progressDialog = new ProgressDialog(WidgetActivity.this, "Loading");
progressDialog.show();

Using this:

ProgressDialog progressDialog = new ProgressDialog(this, "Retrieving_Info");
progressDialog.show();

Keep getting NPE:

Caused by: java.lang.NullPointerException
at com.gc.materialdesign.widgets.ProgressDialog.onCreate(ProgressDialog.java:50)
at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
at android.app.Dialog.show(Dialog.java:262)
at com.gc.materialdesign.widgets.ProgressDialog.show(ProgressDialog.java:77)
at com.*********.onCreate(MainActivity.java:32)

Thanks Ivan. Its working.

But size of the text ("Loading") looks big. Can I modify it?

I tried to change text size by following but getting java.lang.NullPointerException

progressDialog.getTitleTextView().setTextSize(10);