Space-Navigation-View
Space-Navigation-View copied to clipboard
how to set an item inactive when centre button clicked?
same problem here.
Last commit in March. I think they dont work anymore :D
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))
thanks it worked. BTW here is the Java Solution:
spaceNavigationView.setActiveSpaceItemColor(getColor(R.color.colorGray)); spaceNavigationView.changeCurrentItem(-1); spaceNavigationView.setActiveSpaceItemColor(getColor(R.color.colorPrimary));
spaceNavigationView.changeCurrentItem(-1) when centreButton is clicked worked for me, as i set the colors in xml.