skydoves / PowerSpinner

🌀 A lightweight dropdown popup spinner, fully customizable with an arrow and animations for Android.
Apache License 2.0
1.2k stars 114 forks source link

PopupWindow shows in wrong places after onConfigurationChanged() #81

Closed VolodymyrYeletskyi closed 2 years ago

VolodymyrYeletskyi commented 3 years ago

Describe the Bug: In my app I use android:configChanges="orientation|screenSize" for activity in the manifest file, so when screen is rotate onConfigurationChanged method is called.

override fun onConfigurationChanged(newConfig: Configuration) { spinner.dismiss() super.onConfigurationChanged(newConfig) }

After that PopupWindow shows not under the spinner and has a wrong size, and it looks creepy

Expected Behavior: The PopupWindow should be displayed under the spinner with right size

skydoves commented 2 years ago

Hi, sorry for the late response. For the configuration change, I highly recommend dismissing the popup and re-open when the layouts are inflated. Thanks!