Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: How to make a Spinner invisible and then visible again?

Tags:

android

I have the following Spinner:

Spinner spinner = (Spinner)findViewById(R.id.sp1);

and I initially make it invisible like this:

spinner.setVisibility(TRIM_MEMORY_BACKGROUND);

This does make the Spinner invisible but how to make it visible again?

Thanks in advance.

like image 482
js2 Avatar asked Jan 11 '12 20:01

js2


1 Answers

//Hide

spinner.setVisibility(View.GONE);

//Show

spinner.setVisibility(View.VISIBLE);
like image 124
sebastianf182 Avatar answered Nov 11 '22 08:11

sebastianf182