Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. @Override
  2. protected void onStop() {
  3. super.onStop();
  4. System.out.println("You left on Tab " + tabLayout.getSelectedTabPosition());
  5. }
  6.  
  7. @Override
  8. protected void onResume() {
  9. super.onResume();
  10. viewPager.setAdapter(sfpAdapter); //Refresh
  11. if(tabLayout != null){
  12. tabLayout.getTabAt(PUT OLD POSITION IN HERE).select();
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement