addontabselectedlistener java android

Solutions on MaxInterview for addontabselectedlistener java android by the best coders in the world

showing results for - "addontabselectedlistener java android"
Alec
19 Feb 2017
1private void initListener() {
2  tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
3    @Override
4    public void onTabSelected(TabLayout.Tab tab) {
5      mSelectedPosition = tabLayout.getSelectedTabPosition();
6      lazyLoadAdapter.selectedTab(mSelectedPosition);
7    }
8    @Override
9    public void onTabUnselected(TabLayout.Tab tab) {
10    }
11    @Override
12    public void onTabReselected(TabLayout.Tab tab) {
13    }
14  });
15}
16