diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWString.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWString.java index 17a113c1b7..202a3ccc06 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWString.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWString.java @@ -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); diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWUrl.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWUrl.java index d147c51546..02b6f1bd79 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWUrl.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWUrl.java @@ -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);