What comes under onTabChanged in an onTabChangedListener?

125 Views Asked by At

Consider the following scenario:
2 tabs in a parent activity. Each of them has a separate activity (please don't go about saying that this is deprecated and use fragments, I already know that). Now if I add a "OnTabChangeListener" and implement the abstract function "onTabChanged", in which cases will that function be called?
Only when the tabs are switched, i.e. I go from tab1 to tab2 (or the other way around) or also when from tab1/tab2 I go to another activity(not tab2/tab1, but something entirely different).
And is there a way to change the default behaviour?

0

There are 0 best solutions below