Question

What is the difference between activity, activitygroup and Tabactivity?

Was it helpful?

Solution

Activity: An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View). While activities are often presented to the user as full-screen windows, they can also be used in other ways: as floating windows (via a theme with windowIsFloating set) or embedded inside of another activity (using ActivityGroup).

ActivityGroup: A screen that contains and runs multiple embedded activities.

TabActivity: An activity that contains and runs multiple embedded activities or views.

The TabActivities will have a TabHost associated with them.

OTHER TIPS

Try checking out the docs.

Activity:

An activity is a single, focused thing that the user can do.

ActivityGroup extends Activity:

A screen that contains and runs multiple embedded activities.

TabActivity extends ActivityGroup to provide infrastructure for working with a TabWidget, or a row of tabs that allow switching between hosted activities.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top