using View.generateId() instead of fixed value

This commit is contained in:
Roumen Georgiev 2018-05-02 09:22:26 +03:00
parent 3f0c2958c7
commit 15f4f64c4f
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ public class SWString extends SWItem {
if(values.get(values.size()-1) != "" && values.get(values.size()-1) != null) {
EditText editText = new EditText(context);
editText.setId(3);
editText.setId(view.generateViewId());
editText.setText(values.get(values.size()-1));
editText.setInputType(InputType.TYPE_CLASS_TEXT);
editText.setMaxLines(1);

View file

@ -36,7 +36,7 @@ public class SWUrl extends SWItem {
if(values.get(values.size()-1) != "" && values.get(values.size()-1) != null) {
EditText editText = new EditText(context);
editText.setId(1);
editText.setId(View.generateViewId());
// get the last value in list
editText.setText(values.get(values.size()-1));
editText.setInputType(InputType.TYPE_CLASS_TEXT);