1. 程式人生 > >android 開發 checkBox的顯示和隱藏

android 開發 checkBox的顯示和隱藏

           首先使用findviewbyid得到這個checkbox;

      CheckBox pengRadioButton=(RadioButton) findViewById(R.id.peng);


           然後設定可見性 

pengCheckBox.setVisibility(View.GONE);

pengCheckBox.setVisibility(View.VISIBLE);