"The Type TabActivity Is Deprecated" For App Tab
Solution 1:
You can still use a deprecated package. It is however recommended to use Fragments, and thus the support package. You can read more about it here. However, if you are a beginner at java and android development, I would recommend ignoring the deprecation for now and come back to this when you have completed the tutorial you are currently using if you find it educating.
If you want to watch a nice example of tabbed navigation using Fragments, then create a new project in Eclipse using android 4.0 or later. Make sure your android-plugin is updated. You will get the option to create a project with basic navigation already implemented.
Solution 2:
"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
.
Post a Comment for ""The Type TabActivity Is Deprecated" For App Tab"