I have an issue where I need to warn the user before leaving a tab, the tab sits in a ViewPager and is controlled by the tabs in the actionbar.
The viewPager has a typical onPageChangeListener and the actionbar tabs use a TabListener
Basically I am trying to figure out how I can intercept the action to START changing a tab, and only allow it to occur if the user acknowledges the dialog. The callbacks I have tried seem to not block the change to occur. Is there any simple way to achieve this that I am missing? The same action should occur regardless if the user attempts to leave teh tab via either swiping (the ViewPager) or selecting a tab (TabListener)