Scroll profile tab views to top when tab is reselected
This commit is contained in:
parent
64be55e406
commit
ad8be2f7a3
1 changed files with 13 additions and 0 deletions
|
@ -382,6 +382,19 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||
if (position == 4) tab.view.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
tabbar.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener(){
|
||||
@Override
|
||||
public void onTabSelected(TabLayout.Tab tab){}
|
||||
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab){}
|
||||
|
||||
@Override
|
||||
public void onTabReselected(TabLayout.Tab tab){
|
||||
if(getFragmentForPage(tab.getPosition()) instanceof ScrollableToTop stt)
|
||||
stt.scrollToTop();
|
||||
}
|
||||
});
|
||||
|
||||
cover.setOutlineProvider(new ViewOutlineProvider(){
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue