Answers for "addOnTabSelectedListener java android"

0

addOnTabSelectedListener java android

private void initListener() {
  tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
    @Override
    public void onTabSelected(TabLayout.Tab tab) {
      mSelectedPosition = tabLayout.getSelectedTabPosition();
      lazyLoadAdapter.selectedTab(mSelectedPosition);
    }
    @Override
    public void onTabUnselected(TabLayout.Tab tab) {
    }
    @Override
    public void onTabReselected(TabLayout.Tab tab) {
    }
  });
}
Posted by: Guest on October-15-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language