I’m trying to offer tab support for all Android versions 2.2 and above. Is there a way of achieving this without using any deprecated classes/methods?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Problem is as following:
TabActivity is deprecated because it derives from ActivityGroup which is deprecated, too. Problems are, to start Activitys inside Tabs and don’t break callbacks like
onActivityResume. There are some ‘Hacks’ around which solve this but they are ALL relying on the deprecated LocalActivityManager. So I see no solution of usingTabswithout ANY deprecated calls. Since Android 3.X google invented Fragments for this kind of things which are supported on lower Versions with the SupportPackage. You should definetly try them in Combination with the new ActionBar if you want to avoid deprecated classes/methodsEDIT:
Link to FragmentTabs for further reference