The missing member variable is in one of the tutorials. It isn't in the API demos.
On Nov 22, 1:44 pm, Indicator Veritatis <[email protected]> wrote: > So how was it that he got this error, and you did not? You did say the > API demos all compiled for you "out of the box", didn't you? Yet they > were missing this declaration of mTabHost, and the package imports. > > On Nov 19, 11:17 pm, Lance Nanek <[email protected]> wrote: > > > >http://developer.android.com/guide/tutorials/views/hello-tabwidget.html > > >mTabHost will not resolve > > > That one can be fixed by adding this member variable above the > > onCreate function: > > private TabHost mTabHost; > > > The class will need to be imported as well. The imports above the > > class declaration should look like this: > > import android.app.TabActivity; > > import android.os.Bundle; > > import android.widget.TabHost; > > > On Nov 18, 6:11 pm, Captain Heff <[email protected]> wrote: > > > > The API Demos also work for me, however, they're quite a large and > > > unorganised package. As a newbie to both Java and XML, I find tracking > > > down the information I need to make my own tabs in that mess quite > > > difficult. > > > > Instead I have tried to > > > use:http://developer.android.com/guide/tutorials/views/hello-tabwidget.html > > > - the Android dev guide to using tabs. > > > It gives me the error that mTabHost will not resolve. I'm unsure how > > > to fix this as I still can't figure out how to create tabs. Hence why > > > I'm looking for a simple example about tabs. > > > > I also tried two other > > > sources:http://jsharkey.org/blog/2008/02/07/using-android-tabhost/ > > > I figure that I'm copy pasting his code into the wrong place, because > > > it gives all kinds of errors. Some about the XML being wrong, and more > > > variable will not resolve errors. > > > > The third one I tried was about dynamic tabs, a link I found in this > > > site, but that one does not run. > > > > On Nov 19, 1:50 am, Lance Nanek <[email protected]> wrote: > > > > > The API demos (platforms/android-2.0/samples/ApiDemos in the SDK > > > > directory) have 3 different tabs examples and compile and run fine for > > > > me. What error are you getting? > > > > > On Nov 17, 10:17 pm, Captain Heff <[email protected]> wrote: > > > > > > Every single example of using Tabs - be it the example provided on the > > > > > Android dev site, to random samples found through Google - will not > > > > > compile in Eclipse, and furthermore, not run in the Android VM. This > > > > > makes it insanely hard to actually understand how to use this feature. > > > > > > Can anyone give me a quick once-over of how tabs work? -- You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en

