Closed jrcacd closed 5 years ago
I'm using AndroidX Xiaomi redmi 5 plus Android 8.1
val popupMenu = popupMenu {
section {
item {
label = R.string.change
icon = R.drawable.ic_edit_white_48px
iconColor = R.color.md_black_1000 // real black <color name="md_black_1000">#000000</color>
callback = { ... }
}
...
}
}
popupMenu.show(...)
Result
It might be that AppCompat does some internap tinting based on your accent color. Is the result the same if you use a different icon, preferably one that's in your app assets?
Yes
OK, I think I see the issue now. You should be using a color int and not a color resource ID. So in your case this could be:
iconColor = ContextCompat.getColor(context, R.color. md_black_1000)
Hi @jrcacd, Could you provide a code snippet of how you're using it and a screenshot of how it looks like, please? Also, is this happening on any specific device, are you using Android Support Library or AndroidX? Any details would be appreciated :)