如何保持一个对话框/活动在其他活动上,不管活动之间的用户切换,它应该是活着的所有时间。
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.
推荐答案
您可以使用相对布局作为家长,通过使用相对布局,您可以重叠的其他布局。所以,你必须使用相对布局的两个子布局。在一个孩子,你将有弹出,而在另一个布局,你必须不断地改变你的布局。
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.
或
您可以创建一个基础的活动,具有上述布局,扩展了活动需要此布局中的所有其他活动。
You can create a base activity, having above mentioned layout, and extends that activity in all other activities where you want this layout.
问候, Yuvi
更多推荐
保持对话/活动总是在顶部
发布评论