I have an onCheckChangedListener to show a textView depending on which radio button is selected. I have 1 question and 1 problem that I was wondering if anyone could help me wi
The View
class includes a getVisibility() method. Compare that:
Eg:
if (TvFolk1.getVisibility() == View.VISIBLE)
TvFolk2.setVisibility(View.GONE);
To shorten down code, you can also make a method:
public static void goneIfVisible (View v)
{
if (v.getVisibility() == View.VISIBLE)
v.setVisibility(View.GONE);
}
And keep in mind in Java, variables are lowercased, only use uppercase for class names.