ABS
ABS

Reputation: 2803

Android : TabActivity or Fragment? When to use Tabs, when Fragments?

I want to create an application which one of its pages must like below :

tabs

Each tab contains some Views ( like a form )

After some search, I know there is two ways for implementing above layout. TabActivity and Fragment. But I have not use neither Tab nor Fragment in my projects(cause i have short experience on Android)

Now which of these ways I should use? Clearly, I want to know which is more suitable to use? (According to the better one, if there is a brief and clear tutorial, please introduce it to me)

Note : In this case, the application must run on Android 2.3.3+

Upvotes: 1

Views: 292

Answers (1)

matiash
matiash

Reputation: 55370

TabActivity is deprecated. You shouldn't use it, especially if it's an entirely new project.

Fragments are available for older SDKs via the Support Library, so you can use them in 2.3.3+ with no problems.

Upvotes: 1

Related Questions