I am using a Spinner
with android:spinnerMode="dropdown"
. I have also set android:configChanges="orientation|keyboardHidden|screenSize"
to prevent my Activity
to get recreated. when I am in Landscape
mode and click on Spinner
it pops below the Spinner
and have the width same as Spinner
button, now when I rotate the screen to portrait mode the Spinner
button width get reduced according to the screen size but the pop up dialog does not reduce its width accordingly.
Portrait mode screen:
LAndscape Mode Screen
I thought of closing the pop up and reopen it on screen orientation but I didn't found any way to close the pop up dialog.
On the onConfigurationChanged()
method call to spinner.invalidate();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With