Hi,
In my layout xml, I have:
<TabHost android:id="@+id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</TabHost>
My question is how can I get a reference to TabWidget object.
I tried this:
mTabWidget = (TabWidget) findViewById(com.android.internal.R.id.tabs);
but this won't compile since 'com.android.internal.R is not visible.
And then I try change the id to android:id="@+id/tabs" but I get a
run time error saying:
"Your TabHost must have a TabWidget whose id attribute is 'android.R.id.tabs'"
Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---