I have tried this
public void newcheckbox(){
LinearLayout my_layout = (LinearLayout)findViewById(R.id.my_layout);
CheckBox checkBox = new CheckBox(getApplicationContext());
checkBox.setText(""+ETnewcheckbox.getText().toString());
my_layout.addView(checkBox);
}
Aucun commentaire:
Enregistrer un commentaire