How to close one single tab in android tablayout without clearing all the tabs and adding again -


Clear all tabs as well as add tabs to TabHost There are no APIs to delete a single tab.

Clear all tabs tried to

  tabwidget.removeViewAt (index); TabHost.getTabContentView () RemoveViewAt (index)   

After that the behavior is weird, I think the reason for this is that there is still a tabp reference in mTabSpecs mTabSpecs There is a personal variable in TabHost and there are no methods to get a handle on it.

If anyone wants to close the same tab, and yes I have tried to clear all the tabs and add all tabspex back. This does not work for my use, where some scenes involve some information regarding the session. If I rebuilt those tabspeps, then I would go back to the starting point in those scenes.

You can try the visible to the tab To set which you want to see close to . GONE .

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -