Reputation: 737
I have created table layout as follows:
Now my requirement is:
I have number of rows just like in above Image. I want to access edittext value after it get edited in onClick of button which is placed out of table layout. i.e., I want the table row id & childs of that row into onclick of a button which is placed out of that table layout.
Anybody please suggest me idea to achieve this.
Code used to create table layout is:
TableLayout tl=(TableLayout)findViewById(R.id.mytable);
tl.setBackgroundColor(Color.WHITE);
for( int i=0;i<passediduniq.size();i++){
final TableRow tr=new TableRow(MyActivity.this);
//allchilds as in image
}
Upvotes: 0
Views: 664
Reputation: 6277
Your question is so unclear as i understood this may help you.
EditText editText=(EditText)arg1.findViewById(R.id.edit_list_details);
Now get the text from edit text
editText.gettext()
inside button click .
hope this may help.
Upvotes: 1