armcha / armcha/Space-Navigation-View
setCentreButtonColor() does nothing and changeCenterButtonIcon() resets icon filter to black
- Dominant language
- Java
- Stars
- 2k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
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()` and `setInActiveCentreButtonIconColor()` 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the shown setUpCenterButton(position) calls and trace changeCenterButtonIcon(), setCentreButtonColor(), and the icon color-filter methods in the library. Verify the center button keeps the requested icon, background color, and tint after each change, and add or update coverage for those behaviors if the project provides relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100