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.
Asked
Active
Viewed 1,524 times
0
-
1pass some argument to activity to recognize which tab to select, and use setCurrentItem on view pager object. – Harin Jul 14 '15 at 05:39
-
@Harry Thanks it worked.. – Akshay Jul 14 '15 at 06:27
1 Answers
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