问题
I have a spinner hidden in my application and I show it when a button is pressed ( performClick... ). What I want is, when the spinner is displayed, to dim the background so focus is on the spinner. Like when an alert dialog is shown where background gets dimmed. I didn't find anything in the Spinner Documentation. Any suggestions?
回答1:
You can place a full layout view with white or black background between the spinner and other elements and animate its alpha in/out when the spinner appears/disappears. At the end of "out" animation you need to set it's visibility to View.GONE
to disallow it to gather user's clicks.
来源:https://stackoverflow.com/questions/23405177/android-spinner-dim-background