I have a project that has 4 tabs using the actionbar, each of which have their own fragment that they display when the tab is clicked.
What I would like to do is reset the current tab to another (for example from tab4 to tab2) when a button is clicked in the current tab. I’m not sure how to go about this since Fragments are sort of alien to me. How would I be able to get the currently selected tab? How would I be able to set the new tab?
Any help is much appreciated!
I think you mean myTab.setCurrentTab(i) and myTab.getCurrentTab(). You can declare a
for your event handling.