I have created a Custom ProgressDialog as follows: First I have an Animation List with 9 sequential Imges
<?xml version="1.0" encoding="utf-8"?>
<item android:drawable="@drawable/icon_progress_dialog_drawable_1" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_2" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_3" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_4" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_5" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_6" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_7" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_8" android:duration="150" />
<item android:drawable="@drawable/icon_progress_dialog_drawable_9" android:duration="150" />
Then I have a custom style
<style name="CustomDialog" parent="@android:style/Theme.Dialog" >
<item name="android:windowFrame">@null</item>
<item name="android:windowBackground">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowTitleStyle">@null</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:gravity">center</item>
<item name="android:minHeight">70dip</item>
<item name="android:maxHeight">80dip</item>
Now In code I call it as follows
dialog = new ProgressDialog(KaguaHome.this);
dialog.setProgressStyle(R.style.CustomDialog);
dialog.setIndeterminate(true);
dialog.setIndeterminateDrawable(getResources().getDrawable(R.drawable.progress_dialog_icon_drawable_animation));
dialog.show();
The result is
I however want to achieve a progress Dialog with only the image (No white background) and It should be centered,what should I modify?