Blackchart Blackchart - 2 years ago 137
Android Question

how can i set visibility property of radiobutton

I have problem with

in xamarin. I would like to make my
visible but I don't know how to do this. My
are invisible in my xml file. I would like to make them visible from code. I need this because I want to make a list of the last logon users and when I choose one he fill my boxes. But on start I dont have 3 users but only 1 so I need to hide not used RadioButtons. So how can I change property of my RadioButtons?

Answer Source

To make a radio button visible:


To make a radio button invisible:


This works fine presuming you have correctly initialized radioButton in Activity.

For Xamarin.Android C# try this:

button.Visibility = ViewStates.Invisible;

Reference link 1 and Reference link 2

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download