CodingByDay
CodingByDay

Reputation: 27

Is it possible to make Spinner invisible? Xamarin.Android

Hi I have some C# code for the Windows CE app that I'm now making into an Android app with Xamarin.. Is this possible to do with Xamarin spinner? I haven't been able to find an answer to this.. Thanks.

cbSubject.Visible = false;

Upvotes: 0

Views: 41

Answers (2)

CodingByDay
CodingByDay

Reputation: 27

I found a solution. You can change visibility in the following ways.

myView = ViewStates.[Invisible/ Visible/ Gone].

Upvotes: 0

nevermore
nevermore

Reputation: 15786

In code behind:

 Spinner s = new Spinner(context: this);
 s.Visibility = ViewStates.Visible;
 s.Visibility = ViewStates.Invisible;

In xml:

 android:visibility="invisible"
 android:visibility="visible"

Upvotes: 1

Related Questions