Issue
I'm having trouble with the process dialog. I created a drawable that is 200 x 60 px and I created an animation for that drawable.
I want a dialog to pop up while loading... and I want this drawable to show up with an animation.
I tried this after searching on StackOverflow:
I created the animation:
../res/anim/progress_dialog_icon_drawable_animation.xml:
<animation-list xmlns:android="http://schemas.android.com/apk/res/android">
<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" />
</animation-list>
And am calling:
dialog = new ProgressDialog(Context.this);
dialog.setIndeterminate(true);
dialog.setIndeterminateDrawable(getResources().getDrawable(R.anim.progress_dialog_icon_drawable_animation));
dialog.setMessage("Loading...");
dialog.show();
The image shows, but shrunk like the round progress 'circle' animation and I want it to be original size filling the dialog.
Solution
I suppose from the question that you are using custom drawable, you can use a custom dialog with a custom view to set its content. Try this https://stackoverflow.com/a/26821095/1554031
Answered By - Satish
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.