You need to view the documentation and Fragment
samples on the Android Developers website. This will explain what the Fragment can do, and what you should do inside your fragment.
In fact, this is a very simple transition to using fragments when you look at examples. You will need an Activity to contain fragments.
To make this much easier, I would advise you to look into the ActionBarSherlock library, which will allow you to use ActionBar and SupportLibrary back to 2.1.
To get started, you'll want to use the Fragment
and ListFragment
, which will be very similar to standard activity, but the life cycles are slightly different from a few name changes.
source share