Puneet kaur
Puneet kaur

Reputation: 93

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 show data that changes with time.

Upvotes: 7

Views: 22697

Answers (3)

grine4ka
grine4ka

Reputation: 2938

Or maybe you can use AndroidFragments

Upvotes: 8

nine stones
nine stones

Reputation: 3438

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.

Upvotes: 4

Felix
Felix

Reputation: 89626

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).

Upvotes: -3

Related Questions