Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep dialog/activity always on the top

How to keep a dialog/activity on the top of other activities, no matter if user switch between activities,it should be alive all the time.

Look at Show, Hide buttons

like image 605
nsinvocation Avatar asked Jan 21 '26 05:01

nsinvocation


1 Answers

You can use Relative layout as a parent, by using Relative Layout, you can overlap the other layout. So, you have to use to two child layout of relative layout. In the one child you will have popup, and in another layout you have to keep changing your layout..

If you want this across multiple activities. You must create a separate layout and include that in all activities, and create an interface to handle the button events in the popup.

or

You can create a base activity, having above mentioned layout, and extends that activity in all other activities where you want this layout.

Regards, Yuvi

like image 115
Yuvi Avatar answered Jan 22 '26 19:01

Yuvi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!