How to check TextView Visibility using IF

后端 未结 2 1085
既然无缘
既然无缘 2021-02-06 00:23

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

2条回答
  •  死守一世寂寞
    2021-02-06 01:03

    // If TextView is already showing and you want to hide it.

    if (TvFolk1.isShown()) {
        TvFolk2.setVisibility(View.INVISIBLE);
    }
    

    // For uncheck all radio button from radio button groups

    RadioGroup rgButton = (RadioGroup)findViewById(R.id.radiobuttongroup);
    rgButton.clearCheck();
    

提交回复
热议问题