Does ActionBarSherlock provide the ability to enable / disable ActionBar.Tab?

In my application, I want to use ActionBarSherlock, because it is fully consistent with the project. The only problem I am facing is having a tabbed screen, and some of them should be disabled: enter image description here

Only the third tab should be interactive. Another category will be included in the following screens when a user logs in.

Is there a clean way to do this?

+4
source share
1 answer

Could you handle this behavior in a TabListener? and return the tab back to tab3 if others were not included.

myTab.setTabListener(new TabListener() { @Override public void onTabUnselected(Tab tab, FragmentTransaction ft) { } @Override public void onTabSelected(Tab tab, FragmentTransaction ft) { //if not tab3 & not enabled revert to tab 3 actionbar.selectTab(tab3) } @Override public void onTabReselected(Tab tab, FragmentTransaction ft) { } }) 
0
source

Source: https://habr.com/ru/post/1395572/


All Articles