Space-Navigation-View icon indicating copy to clipboard operation
Space-Navigation-View copied to clipboard

how to set an item inactive when centre button clicked?

Open Moseqi opened this issue 6 years ago • 5 comments

Moseqi avatar Mar 05 '19 10:03 Moseqi

same problem here.

lreiner avatar May 04 '19 16:05 lreiner

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

lreiner avatar May 07 '19 15:05 lreiner

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))

Moseqi avatar May 08 '19 03:05 Moseqi

thanks it worked. BTW here is the Java Solution:

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

lreiner avatar May 13 '19 10:05 lreiner

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

Nasib555 avatar Apr 26 '21 05:04 Nasib555