For making tab there is two way which i found
You can also:
Use a
ViewPager
with a tabbed indicator, such asPagerTabStrip
, theTabPagerIndicator
from the ViewPagerIndicator project,PagerSlidingTabStrip
, etc.Use tabs in the action bar (note: these will convert into a drop-down list in some device sizes and orientations)
Use
FragmentTabHost
Use
TabHost
andTabWidget
in a regularActivity
The following sample projects demonstrate:
PagerTabStrip
: https://github.com/commonsguy/cw-omnibus/tree/master/ViewPager/TabPagerTabPageIndicator
: https://github.com/commonsguy/cw-omnibus/tree/master/ViewPager/VPIaction bar tabs: https://github.com/commonsguy/cw-omnibus/tree/master/ActionBar/TabFragmentDemo
TabHost
andTabWidget
: https://github.com/commonsguy/cw-omnibus/tree/master/WidgetCatalog/Tab
Note that the first three samples all use ActionBarSherlock, so they run on Android 2.x devices. The fourth one should run on anything from Android 1.0 onwards.