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

how to set an item inactive when centre button clicked? #92

Open
Moseqi opened this issue Mar 5, 2019 · 5 comments
Open

how to set an item inactive when centre button clicked? #92

Moseqi opened this issue Mar 5, 2019 · 5 comments

Comments

@Moseqi
Copy link

Moseqi commented Mar 5, 2019

No description provided.

@lreiner
Copy link

lreiner commented May 4, 2019

same problem here.

@lreiner
Copy link

lreiner commented May 7, 2019

Last commit in March. I think they dont work anymore :D

@Moseqi
Copy link
Author

Moseqi commented May 8, 2019

Hey @lreiner
I have found some work around here for a temporary solution
You can set these lines when your center button is clicked
but remember, this is just a hack, not the actual solution. May
be they will update this in newer version

spaceNavigationView?.setActiveSpaceItemColor(resources.getColor(R.color.colorGreyStep))
spaceNavigationView?.changeCurrentItem(-1)
spaceNavigationView?.setActiveSpaceItemColor(resources.getColor(R.color.colorPrimary))

@lreiner
Copy link

lreiner commented May 13, 2019

thanks it worked. BTW here is the Java Solution:

spaceNavigationView.setActiveSpaceItemColor(getColor(R.color.colorGray)); spaceNavigationView.changeCurrentItem(-1); spaceNavigationView.setActiveSpaceItemColor(getColor(R.color.colorPrimary));

@Nasib555
Copy link

spaceNavigationView.changeCurrentItem(-1)
when centreButton is clicked worked for me, as i set the colors in xml.

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