Does the dialog pause the call?

At the risk of this stupid question:

Every time I create a dialog, the action that creates and owns the dialog is paused - I say this because the animation from my action stops working. Is there a way to create a dialogue so that your animations continue to work, although the focus will be set in the dialog box? Thank.

+5
source share
2 answers

The life cycle of an activity is such that if an activity loses focus, its onPause method is called if you don’t want to, and you still want to lose focus from the activity layout, you have a relative layout that has a width and height that fills the parent element, one has its own the activity layout and the other background layout is transparent, add the ProgressBar to the second layout. first set the visibility of the second layout. and set visible or absent when you want to display or reject the dialog.

+1
source

I know this is a really old question, but I have not found the answer anywhere. I solved this by calling Dialog as follows:

yourDialog.setOwnerActivity(this);
yourDialog.show();

You must pass the calling context as a parameter and keep the activity in the background of the dialog.

0
source

All Articles