Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable first tab autoselection #876

Open
buelersandra opened this issue Nov 28, 2017 · 2 comments
Open

disable first tab autoselection #876

buelersandra opened this issue Nov 28, 2017 · 2 comments

Comments

@buelersandra
Copy link

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

@123shubham123
Copy link

123shubham123 commented Dec 2, 2017

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;
}
}

@rajesh-codes
Copy link

dear @123shubham123 , not working...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants