How can I create a new checkbox every time I click a button and how do I hide a check box?

Also, why doesn’t checkbox.setVisibility(View.Gone); 21 more words