Search code examples
androidandroid-fragmentstabsandroid-tabhost

Which one to use with tabhost: FragmentActivity or TabActivity?


I'm beginner in android development. When searching the web I have found that it is possible to make tabs by having the separate activities for each tab or have fragments instead. I would like to know more about theory so, my question is where it will be appropriate to use fragments and where activities? I'm curious because there might be some considerable differences for example in memory, performance or UI. Hope that I'm clear and will appreciate any help.


Solution

  • After reading articles on developer site, particularly page below, I have found that TabActivity is deprecated. They advice to use FragmentActivity and with the help of v4 support library it can be implemented in older version of android.

    https://developer.android.com/reference/android/app/TabActivity.html