0

I'm referring this example to implement TabLayout and I'm done with it. But my problem is as per my app requirement I want to jump to perticular Tab from another activity.and also perform some action on current Tab. So can anybody tell me how to get Current Tab and set particular Tab.

Akshay
  • 6,029
  • 7
  • 40
  • 59

1 Answers1

0

You'll need to add the tab you want to be selected first (For Example, Tab2 is default selected).

actionBar.addTab(tab2);
actionBar.addTab(tab0, 0, false);
actionBar.addTab(tab1, 1, false);
Kinnar Vasa
  • 397
  • 1
  • 9