I want to hide spinner form view i.e. set height to zero. (I have tried setVisibility. But it just hides the spinner. The widget still occupies the same height as before.)
And then I want to show Spinner i.e. set height of spinner to “wrap_content” on an event.
How can I do it?
Please note that I want to do this on the spinner widget itself and not on the adapter’s view.
Have you tried setVisibility(View.GONE)
Because setVisibility(View.INVISIBLE) only makes it invisible but does not make room on layout while GONE does make room.