安卓:查看两项活动在一个屏幕 [英] Android: Viewing Two Activities in One Screen

查看:128
本文介绍了安卓:查看两项活动在一个屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找有一次看到两个活动,最简单的方法,让一个活动始终保持可见,并与用户交互的其他变动。

I'm looking for the simplest way to have two activities displayed at once, so that one Activity always remains visible, and the other changes with user interaction.

在换句话说:

  • 我现在有$ C $下有几个活动方案。
  • 用户可以在这些活动之间切换。
  • 我要添加一个新的活动,将永远是沿着什么,我已经有了明显的。
  • 当用户从当前活动到另一个导航,这个新的侧活动将保持可见。

我已经看到了很多不同的想法在做类似的事情,但一直没能使其适应我的需求。

I've seen many different ideas for doing something similar, but haven't been able to adapt them to my needs.

任何帮助将是AP preciated。

Any help would be appreciated.

推荐答案

没有你想要的是可能的活动。最接近的是使用主题,使你的身边的活动是落后于其他非全屏活动部分可见。不过,得到这个就广泛的屏幕尺寸的正常工作将是困难的,和管理任务堆栈拉这一关并不在我看来他们是多的乐趣。

None of what you want is possible with activities. The closest thing is using themes so that your "side activity" is partially visible behind other non-full-screen activities. However, getting this to work properly on a wide range of screen sizes will be difficult, and managing your task stack to pull this off does not strike me as being much fun.

您应该能够创造一些类似于你寻求与片段的正确应用,但你会风与一个大的活动和一堆碎片,而不是一堆的活动。

You should be able to create something that resembles what you seek with the proper application of fragments, but you will wind up with one large activity and a bunch of fragments, as opposed to a bunch of activities.

目前的活动水平,Android的目的不是为你寻求一些持久的元素。

At the activity level, Android is not designed for some persistent element that you seek.

这篇关于安卓:查看两项活动在一个屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆