In android how to close TabWidget when a tab is selected.
As the title, I want close the TabWidget where some tab is selected.
views:
165answers:
3This means close the tabs row when a tab is selected.Just display the child activity.
imcaptor
2010-05-24 07:33:16
Ah! Do you mean the row where tabs are shown so that you can select one or the other? That, AFAIK, cannot be closed.
MasterGaurav
2010-05-25 06:19:07
A:
//I use the OnTabChangeListener solve the question.
mTabHost.setOnTabChangedListener(new OnTabChangeListener(){
@Override
public void onTabChanged(String tabId) {
if (DEBUG) Log.d(TAG, "onTabChanged()");
if("testTabId".equals(tabId)) {
//destroy earth
Intent intentTabMe = new Intent(MainActivity.this, UserDetailsActivity.class);
intentTabMe.setAction(Intent.ACTION_VIEW);
startActivity(intentTabMe);
}
}
});
imcaptor
2010-05-24 08:55:50
A:
What will I do when I want to close only the selected tab?????? Is there any function like remove tab????? Here only the current tab will be removed...... plz help......
Toufique
2010-09-27 09:42:30