I create tabs dynamically in a TabActivity.
Is there a simple way to ask for the number of existing Tabs?
I create tabs dynamically in a TabActivity. Is there a simple way to ask
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.
Maybe a bit of a workaround, but you should be able to use:
getTabHost().getTabWidget().getTabCount().I just tested this in my app and it worked correctly.
See here for more info: http://developer.android.com/reference/android/widget/TabWidget.html#getTabCount()