When I clciked on the first Tab, the tabId passed into onTabChanged is
always null. Anyone faced same problem? Known bug? or It is my code's
problem?

Code:
      TabHost.TabSpec tab1 = tabs.newTabSpec("text");
        tab1.setContent(R.id.text_input);
        tab1.setIndicator("text",
this.getResources().getDrawable(R.drawable.pencil));
        tabs.addTab(tab1);
       TabHost.TabSpec tab2 = tabs.newTabSpec("image");
   tab2.setContent(R.id.picture_input);
 
tab2.setIndicator("image",this.getResources().getDrawable(R.drawable.camera));
        tabs.addTab(tab2);
        tabs.setOnTabChangedListener(new TabChanged());

class TabChanged implements TabHost.OnTabChangeListener
            {
                 public void onTabChanged(String arg0)
                 {
                         saveOldTabInfo();
                         populateTabInfo(arg0);
                }
            }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to