Jason Proctor wrote:
> wow, i'm having a lot of trouble with tabs. TabSpec can't find any 
> view IDs that i specify in setContent(), even though i can inflate 
> them manually if i implement TabContentProvider.
> 
> if i set my TabSpec up in the XML, i get crashes in TabHost because 
> the current view isn't set (i think). plus the view hierarchy ends up 
> being really deep, seems like i'm doing something wrong somewhere.
> 
> the Tab1 example in the SDK references the subviews in the XML *and* 
> in the Java, which seems a bit odd.

Tough to tell without seeing your code. If you're not using TabActivity,
be sure to call setup() on your TabHost after you get it via
findViewById(). If you are using TabActivity, be sure to ask it for your
TabHost.

> and finally :-) can i get called when the user picks a tab? 

Yup.

> i see 
> callbacks for everything else, but not that. 

TabHost#setOnTabChangedListener()

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to