In my project I have some EditText being generated at run time, the EditText number is variable. I need to retrieve the typed texts and store them in different variables, and then create a Json object with it.
Here is the method I use to create the EditText :
public View editText(String nmLabel, String tpRender) {
EditText e = new EditText(getBaseContext());
e.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
// e.setHint("DATE");
if(tpRender.equals("NUMBER")) {
e.setHint("NUMBER");
}
else if(tpRender.equals("DATE")) {
e.setHint("DATE");
}
else if(tpRender.equals("TEXT")) {
e.setHint("TEXT");
}
e.setTextColor(Color.BLACK);
e.setTextSize(20);
return(e);
}
How do I get the texts typed separately?