Reputation: 14565
I'm really interested if I can create two dialogs in Android in same time in one activity. Here is what I want to achieve : I want to have a circle progress bar with a cancel button and at the bottom of my activity to have a horizontal progress dialog which indicates some calculations. Is there any option to create something like this or similar to this?
Thanks in Advance!
Upvotes: 3
Views: 1831
Reputation: 26547
You cannot show multiple dialogs at the same time, however you can create an activity with a transparent background which looks like two different dialogs.
Upvotes: 2
Reputation: 1372
You can call
ProgressDialog#getWindow#setGravity(...) to change the gravity.
So:
ProgressDialog dialog = ProgressDialog.show(AContext, "Test", "On the bottom");
dialog.getWindow().setGravity(Gravity.BOTTOM);
Upvotes: 2
Reputation: 27727
There is no reason why the synchronizing bar, progress bar, and cancel button could not be part of the same dialog that has a transparent background.
Upvotes: 2