I have a table layout called tab to which i'm adding dynamic tablerows. Each tablerow has an edittext with values set from the database, and a textview. On page load the focus is set to the first edittext. How do i retreive the value of the edittext which is focused??
I tried this :
tab.getChildAt(0).requestFocus();
then I tried to retrieve the value using tab.getFocusedChild().toString();
The result in my logcat is something like this:
Focused Location ===== android.widget.TableRow@44ecada8
You can try this
TableRow row1= (TableRow)tableLayout.getChildAt(rowPosition);
EditText et=(EditText ) row1.getChildAt(0);
String text=et.getText().toString();
Hope this helps you