using View.generateId() instead of fixed value
This commit is contained in:
parent
3f0c2958c7
commit
15f4f64c4f
2 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ public class SWString extends SWItem {
|
||||||
|
|
||||||
if(values.get(values.size()-1) != "" && values.get(values.size()-1) != null) {
|
if(values.get(values.size()-1) != "" && values.get(values.size()-1) != null) {
|
||||||
EditText editText = new EditText(context);
|
EditText editText = new EditText(context);
|
||||||
editText.setId(3);
|
editText.setId(view.generateViewId());
|
||||||
editText.setText(values.get(values.size()-1));
|
editText.setText(values.get(values.size()-1));
|
||||||
editText.setInputType(InputType.TYPE_CLASS_TEXT);
|
editText.setInputType(InputType.TYPE_CLASS_TEXT);
|
||||||
editText.setMaxLines(1);
|
editText.setMaxLines(1);
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class SWUrl extends SWItem {
|
||||||
|
|
||||||
if(values.get(values.size()-1) != "" && values.get(values.size()-1) != null) {
|
if(values.get(values.size()-1) != "" && values.get(values.size()-1) != null) {
|
||||||
EditText editText = new EditText(context);
|
EditText editText = new EditText(context);
|
||||||
editText.setId(1);
|
editText.setId(View.generateViewId());
|
||||||
// get the last value in list
|
// get the last value in list
|
||||||
editText.setText(values.get(values.size()-1));
|
editText.setText(values.get(values.size()-1));
|
||||||
editText.setInputType(InputType.TYPE_CLASS_TEXT);
|
editText.setInputType(InputType.TYPE_CLASS_TEXT);
|
||||||
|
|
Loading…
Reference in a new issue