We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
popupMenu { style = R.style.Widget_MPM_Menu_Custom section { attachmentList?.forEach { item { iconColor = Color.WHITE labelColor = Color.WHITE iconDrawable = it.icon label = it.title callback = { intent(it.url) } } } }
R.style.Widget_MPM_Menu_Custom
<style name="Widget.MPM.Menu.Custom"><item name="android:colorBackground">#ffaf00</item></style>
val drawables = arrayListOf<Drawable>() val popup = popupMenu { style = R.style.Widget_MPM_Menu_Custom dropDownVerticalOffset = toolBar.height section { attachmentList?.forEach { item { iconColor = white labelColor = white iconDrawable = it.icon iconDrawable?.apply { drawables.add(this) } label = it.title callback = { intent(it.url) } } } } } // Junky way to patch this bug. popup.setOnDismissListener { drawables.forEach { drawable -> drawable.filter(white) } } popup.show(context!!, it)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
where
R.style.Widget_MPM_Menu_Custom
is<style name="Widget.MPM.Menu.Custom"><item name="android:colorBackground">#ffaf00</item></style>
The icons in the above example start white, but when one of them is selected or the dialog is dismissed, they turn black.
My solution was to repaint them on dismiss, like below.
The text was updated successfully, but these errors were encountered: