I am Having the small doubt on tab-widget.
- How i can get the position of tab widget dynamically?
- Assume that there are of 20 tabs,when i clicked on the 10 tab i need to display the position of that tab.
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.
use OnTabChangeListener interface to TabHost
http://developer.android.com/reference/android/widget/TabHost.OnTabChangeListener.html
onTabChanged(String tabId)this will give you String id of selected tab
and use
setCurrentTabByTag(String tag)of TabHost to get current Tabor
http://developer.android.com/reference/android/widget/TabHost.html
String getCurrentTabTag()will give currentTab Tag stringint getCurrentTab()will give you currentTab int position