You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Firstly, thank you to teach us android. We realize how much effort to put to create repo, atricale and such post. Honestly, salute you for your job 👍 💯
Well I want your response on this your below code mention code from this site . The example is working perfectly but what I have view that the below use is useless ? Why are you again attaching pageChangeListener ?
viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
if (prevMenuItem != null) {
prevMenuItem.setChecked(false);
}
else
{
bottomNavigationView.getMenu().getItem(0).setChecked(false);
}
Log.d("page", "onPageSelected: "+position);
bottomNavigationView.getMenu().getItem(position).setChecked(true);
prevMenuItem = bottomNavigationView.getMenu().getItem(position);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
The text was updated successfully, but these errors were encountered:
Hi,
Firstly, thank you to teach us android. We realize how much effort to put to create repo, atricale and such post. Honestly, salute you for your job 👍 💯
Well I want your response on this your below code mention code from this site . The example is working perfectly but what I have view that the below use is useless ? Why are you again attaching pageChangeListener ?
The text was updated successfully, but these errors were encountered: