Hi,

I am studying Tabs1.java and Tabs2.java example in APIDemo

My questions are:
1. Why they don't need to call:
setContentView(R.layout.main);

In all other examples, I see setContentView(R.layout.main) are called?
If that is not call, how android contructs 'TabHost' and 'TabWidget'
and Tab content?

2. In Tabs1, it does

    TabHost tabHost = getTabHost();

        LayoutInflater.from(this).inflate(R.layout.tabs1,
tabHost.getTabContentView(), true);

        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("tab1")
                .setContent(R.id.view1));
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("tab2")
                .setContent(R.id.view2));
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("tab3")
                .setContent(R.id.view3));

What does this mean? What does it use tabs1.xml for? Why tabs1.xml
uses <FrameLayout>?


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

Reply via email to