Skip to content
New issue

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

spinnerBackgroundColor not switching when toggling dark / light theme #7

Closed
shoheikawano opened this issue Aug 25, 2021 · 1 comment

Comments

@shoheikawano
Copy link

shoheikawano commented Aug 25, 2021

Please complete the following information:

  • Library Version v1.1.0
  • Affected Device(s) Pixel 5

Describe the Bug:

The value passed to spinnerBackgroundColor is remembered, so the color does not change even when the theme is toggled from/to dark/light.

val spinnerView = remember {
createPowerSpinnerView(context) {
setShowArrow(false)
setShowDivider(showDivider)
setDividerColor(dividerColor.toArgb())
setDividerSize(context.dp2Px(dividerSize))
setLifecycleOwner(lifecycleOwner)
setSpinnerPopupAnimation(spinnerAnimation)
setSpinnerPopupBackgroundColor(spinnerBackgroundColor.toArgb())
setDismissWhenNotifiedItemSelected(dismissWhenNotifiedItemSelected)
setOnSpinnerOutsideTouchListener { view, motionEvent ->
onSpinnerOutsideTouched(view, motionEvent)
}
}

Expected Behavior:

Since the color value passed to color switches when toggling the app theme, I suppose the background color of spinner should also switch based on which theme is currently applied.

@skydoves
Copy link
Owner

Hi @shoheikawano, sorry for the delayed response.
This issue was fixed and included in the new 1.2.0 version. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants