开发者

Display multiple activities on same screen

Is it possible to show two activities on the same screen at the same time? I need each activity to开发者_如何学Python show data that changes with time.


Or maybe you can use AndroidFragments


It's late after the question. But you should look at ActivityGroup

Inherits from Activity, so you should be able to run this as the parent.


Yes, it is definitely possible. Even when you display a menu or a dialog, that menu/dialog is a separate activity running on top of yours. However, you should avoid doing that as much as possible. It is only useful to display two activities at the same time if one of the activities does not belong to your application (which is the case with menus/dialogs). If both activities come from your own application, you should find a way to merge them into one. This way you use up less memory and less CPU (as there's no overhead of starting a new process).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜