1

Android provides tab layout for us to separate the application into few activities.
However, is it a good practice to use tab layout?
Should we use buttons instead of tabhost?
I really have no ideas and I don't know which fields I can compare between them.
Please help..

jjLin
  • 3,281
  • 8
  • 32
  • 55

1 Answers1

1

One approach is to use TabHost and TabActivity. However, TabActivity is deprecated and it is recommended you use Fragments instead of this approach.

Here is a good explanation and tutorial regarding Fragments. Note that if you are developing for Android below 3.0 (API 11), you will need to download the v4 support library to use fragments, and a couple of important method names will be changed from the tutorial.

Another approach I have used before is to just use buttons and regular views, making sure to inflate and show each view when necessary. I haven't done as much with Fragments, but they seem to take some of the work out of inflating the views, etc.

Andy Harris
  • 928
  • 5
  • 10