1
In my project I have some Edittext being generated at runtime, the number of Edittext is variable.
I need to retrieve the typed text and store it in different variables, 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?
It worked 100%, thank you!
– Morfina