1

This is my code for creating a table and appending data dynamically:

table = (TableLayout)findViewById(R.id.table);    
inflater = getLayoutInflater();    

for(int i = 0; i < 5; i++) {    
    row = (TableRow)inflater.inflate(R.layout.row,table, false);    
    TextView text = (TextView)row.findViewById(R.id.text1);    
    text.setText("sss:" + i);     
    text1 = (EditText)row.findViewById(R.id.text2);
    text2 = (TextView)row.findViewById(R.id.text3);   
    text2.setText("");    
    text1.addTextChangedListener(new MyWatcher(text2));    
    table.addView(row);    
}    

This code is working fine, but my problem occurs when I click the button. I want to get the values from each row which is to be only filled.

NxtBtn.setOnClickListener(new View.OnClickListener() {   
    public void onClick(View view) {    
    }  
});  

Please help me.

JimiLoe
  • 950
  • 2
  • 14
  • 22
Abdul Naseer
  • 43
  • 1
  • 7

0 Answers0