How Can I Set Visibility Property Of Radiobutton
I have problem with RadioButton in xamarin. I would like to make my RadioButtons visible but I don't know how to do this. My RadioButtons are invisible in my xml file. I would like
Solution 1:
To make a radio button visible:
radioButton.setVisibility(View.VISIBLE);
To make a radio button invisible:
radioButton.setVisibility(View.GONE);
This works fine presuming you have correctly initialized radioButton
in Activity.
For Xamarin.Android C# try this:
button.Visibility = ViewStates.Invisible;
Solution 2:
Try this code:
RadioButtonrb= (RadioButton) findViewById(R.id.firstRadio);
rb.setVisibility(View.VISIBLE);
Solution 3:
This is kind of a pain sometimes, because sometimes you have to dig a little bit deaper, since it does not always work 100%, but the Basic in Xamarin/C# to use is as follow:
rb.Visibility=ViewStates.Visible;
Post a Comment for "How Can I Set Visibility Property Of Radiobutton"