views:

924

answers:

1

hi, is it possible to show two activies on same screen at a time. and each activity is showing data which changes with time .. Thanks

A: 

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

Felix
I think you have mistaken Activities with Views. It is not possible to have multiple Activities at the same time; Views - yes. Activities are registered in Manifest and can be started one at a time. See http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
Marcin Gil
You are right. Sorry for the misinformed answer. My argument to combine the functionality into the same Activity is even stronger now, though :) +1
Felix
so final conclusion is we can not have two simultaneously activities. but i can't merge the functionality in same activity also.socan we use widget as better option ,as my requirement would be fullfilled this way
Puneet kaur
Maybe you'd want to use `Service` s? It would be helpful to tell us more about what you are trying to achieve.
Felix
Puneet kaur