简体   繁体   English

是否可以使 Spinner 不可见? Xamarin.Android

[英]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? 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;

In code behind:在后面的代码中:

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

In xml:在 xml 中:

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

I found a solution.我找到了解决方案。 If ever somebody needs this it is: myView = ViewStates.[Invisible/ Visible/ Gone].如果有人需要这个,那就是:myView = ViewStates.[Invisible/Visible/Gone]。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM