“The type TabActivity is deprecated” For app tab

前端 未结 2 1149
误落风尘
误落风尘 2021-01-14 12:28

\"The type TabActivity is deprecated\"?

I am making the Tabs of app following tutorial book.

I\'ve checked from the android developer.com website, but i have

2条回答
  •  情深已故
    2021-01-14 13:02

    "Deprecated" means that the api developers don't recommend using it anymore, probably because its not a good model, or inefficient, etc. Fragments were introduced in Honeycomb and can be used to provide a similar functionality as tabs and is more in-line with android's current design philosophy.

    Since Fragment was introduced in Android 3.0 Honeycomb, you might think you cannot use that for pre-Honeycomb devices. Enter Support Libraries. They are libraries which you can include in your application which needs to run on pre-Honeycomb and still use this class.

    So if you want to, you can finish the TabActivity as described in whatever tutorial you are following, it'll probably work on a few more upcoming android versions. But it is recommended that you start using Fragments.

提交回复
热议问题