BottomBar icon indicating copy to clipboard operation
BottomBar copied to clipboard

disable first tab autoselection

Open buelersandra opened this issue 8 years ago • 2 comments

Is it possible to prevent the first tab from being selected until user tabs/clicks to select?

buelersandra avatar Nov 28 '17 22:11 buelersandra

in your Activity's Oncreate---
bottom_navigation_bar.setOnTabSelectListener(this);
bottom_navigation_bar.setOnTabReselectListener(this);

then: public void onTabSelected(@IdRes int tabId) { if (bottom_navigation_bar.getRootView().findViewById(tabId).isPressed()){ switch (tabId) { case R.id.tab_home: break; case R.id.something: break; case R.id.something: break; case R.id.something: break; } } } and put first tab on "onTabReSelectedmethod" @Override public void onTabReSelected(int tabId) { switch (tabId) { case R.id.tab_home: break; } }

123shubham123 avatar Dec 02 '17 10:12 123shubham123

dear @123shubham123 , not working...

rajesh-codes avatar Dec 02 '17 19:12 rajesh-codes