Android TabActivity debrecation API

Ok, im development and app for api 8 with TabActivity , but today I found out that "this class is deprecated".

So now we have to use FragmentActivity to implement tabs? but what about when I want to show a listview with activity? Should I use ListFragment (but this is "C: API Level 11")

As you can see, I am embarrassed about how to move on.

It would be great if someone could provide me with good and clear concepts about these issues, tabs, snippets, and any other useful tips ( AsyncTaskLoader for api11 only?)

btw, I read that fragment can be used with api 1, but now I can not find it. please, help: (

edit: just change the name of cuz. ListFragment is not out of date. If I do not allow this, plz sorry newby here: D

+4
source share
3 answers

You can use android-support-v4.jar to use the snippet in the lower version

+2
source

Well, I am developing an app and an api 8 app with TabActivity, but today I found out that "this class is deprecated."

In Android, "obsolete" usually means "we will continue to support this as long as we can, but there are better options that you should consider." In the case of TabActivity, the long-term plan is for the tabs to be in the action bar, which you can use on Android 3.x and higher, and on Android 2.x, down, using something like ActionBarSherlock .

So now we have to use FragmentActivity to implement tabs?

Not necessary, although this is certainly an option.

but what about when I want to show a listview with activity? I am using ListFragment (but this is "C: API Level 11")

ListFragment also available in the Android Support Package, where you get the FragmentActivity .

AsyncTaskLoader api11 only?

AsyncTaskLoader also available in the Android Support Package.

It would be great if someone could provide me with good and clear concepts about these problems, tabs, fragments and any other useful advice.

This will cover a couple of hundred pages in books. You may consider additional issues where you are more specific.

If you have not already done so, read:

+6
source

Snippets have a support package up to API 4.

API Reference 4

0
source

Source: https://habr.com/ru/post/1381344/


All Articles