Search code examples
android-spinnerorientation-changes

Handling for spinner on orientation change - android


I have spinner in my activity. When spinner is clicked, drop-down is shown. Now, Change orientation. That drop-down is not maintained. Is there any way to shown drop-down again on orientation change?

Thanks in advance.


Solution

  • Your question is a bit unclear to me.

    Please try adding this to your <activity> in your android manifest:

    android:configChanges="orientation|screenSize|keyboardHidden"
    

    See this for details

    (Some might say this is not the right way to do it, but you can use this until you find a better solution)