Reputation: 1541
I'm working on an android sample project, which makes use of TabActivity. But as this is deprecated now, I replaced it with the 'Fragment' activity. Now I don't know what to use, to replace,
TabHost tabHost = getTabHost()
which I had used while using TabActivity.
Also, setContentView(R.layout.main)
and setClass()
in intent = new Intent().setClass()
is giving an error.
Upvotes: 2
Views: 974
Reputation: 189484
You could use Action Bar Sherlock. This open source library gives you an action bar for every Android Version down to 1.6
This enables you to create tabs in the Honeycomb style with the Honeycomb APIs, therefore you do not need to use the deprecated tab APIs.
Upvotes: 2