cppdev
cppdev

Reputation: 6973

Styling Android ProgressDialog

I want to show custom animation in my ProgressDialog. After reading few posts, I understood that we can define custom styles in styles.xml and provide our own custom drawable there. But, when I am trying to define styles for ProgressDialog, it is not allowing me to do so. Am I doing something wrong here?

< style parent="@android:style/Widget.ProgressDialog" name="MyProgressDialog"> 

< item name="android:progressDrawable">@anim/myanim < /item> 

< /style>

It does not understand Widget.ProgressDialog. What is the difference between ProgressBar and ProgressDialog if I put ProgressBar in Spinner mode ?

Upvotes: 1

Views: 1575

Answers (1)

Romain Piel
Romain Piel

Reputation: 11177

I wouldn't use styles to make a custom progress dialog. Making a custom dialog is quite easy when you inflate it from an xml layout.

Upvotes: 2

Related Questions