Open tamimattafi opened 5 years ago
I have the same bug with setActiveCentreButtonIconColor() and setInActiveCentreButtonIconColor(), do you found solution for this?
Hello again! I'm implementing a logic to change the center button's appearance for each fragment from
viewPage
, the icons change but unfortunately their tint resets to black,setActiveCentreButtonIconColor()
andsetInActiveCentreButtonIconColor()
make no changes.changeCenterButtonIcon()
doesn't work as well. I hard-coded my svg icons to be white but still, they become black on icon change.setCentreButtonIconColorFilterEnabled()
does nothing.private fun setUpCenterButton(position: Int) { with(mainNavigation) { when (position) { 1 -> { changeCenterButtonIcon(R.drawable.ic_filter) setCentreButtonColor(AppUtils.getColor(this@MainActivity, R.color.colorGrayDark)) } 2 -> { changeCenterButtonIcon(R.drawable.ic_share) setCentreButtonColor(AppUtils.getColor(this@MainActivity, R.color.colorBlue)) } 3 -> { changeCenterButtonIcon(R.drawable.ic_add_to_cart) setCentreButtonColor(AppUtils.getColor(this@MainActivity, R.color.colorLightRed)) } else -> { changeCenterButtonIcon(R.drawable.ic_message) setCentreButtonColor(AppUtils.getColor(this@MainActivity, R.color.colorAccent)) } } } }
are there any solutions?
#FF000000
black looks really ugly.
I have not called spaceNavigationView.setCentreButtonSelectable(true) , after i call this in activity onCreate my problem is gone, try this ,maybe your problem in this
I have just started to use the library, same use-case I wanna change the center dynamically but it does work only when changed during the onCreate phase. I does not work after that.
Hello again! I'm implementing a logic to change the center button's appearance for each fragment from
viewPage
, the icons change but unfortunately their tint resets to black,setActiveCentreButtonIconColor()
andsetInActiveCentreButtonIconColor()
make no changes.changeCenterButtonIcon()
doesn't work as well. I hard-coded my svg icons to be white but still, they become black on icon change.setCentreButtonIconColorFilterEnabled()
does nothing.are there any solutions?
#FF000000
black looks really ugly.