Hi there,
can some one please help me in finding the problem,
when i run the example for tab application
i get Fatal EXCEPTION mian
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
/**
* TabHost will have Tabs
**/
TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);
/** TabSpec used to create a new tab.
* By using TabSpec only we can able to setContent to the tab.
* By using TabSpec setIndicator() we can set name to tab.
**/
TabHost.TabSpec spec1, spec2;
spec1 = tabHost.newTabSpec(".TabOne").setIndicator("Tab
One").setContent(new Intent().setClass(TabBarExample.this,
FirstTab.class));
spec2 = tabHost.newTabSpec(".TabTwo").setIndicator("Tab
Two").setContent(new Intent().setClass(TabBarExample.this,
SecondTab.class));
/**
* add the created tab to the tab host for display
**/
// this is the line where i get this error/exception
tabHost.addTab(spec1);
tabHost.addTab(spec2);
}
can please some genious have a look on the code and tell e where am i
making mistake
thanks
shiraz
--
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