2010-03-02 2 views

Répondre

2
final TableLayout Tlayout = new TableLayout(getApplicationContext()); 
Trow = new TableRow(getApplicationContext()); 

checkBox = new CheckBox(getApplicationContext()); 
Trow.addView(checkBox); 

button = new Button(getApplicationContext()); 
button.setText("Button"); 
Trow.addView(button); 

textBox = new EditText(getApplicationContext()); 
textBox.setText("default_value"); 
Trow.addView(textBox); 

Tlayout.addView(Trow); 

Ce code peut vous aider à créer des éléments de formulaire dynamiques.

Questions connexes