Android:fix input set Text,set selection to the last
This commit is contained in:
parent
b006658fb9
commit
0290c7a929
@ -84,7 +84,9 @@ public class InputNode extends ViewNode<EditText> implements TextWatcher, View.O
|
|||||||
view.setFilters(newFilters);
|
view.setFilters(newFilters);
|
||||||
break;
|
break;
|
||||||
case "text":
|
case "text":
|
||||||
view.setText(prop.asString().toString());
|
String text = prop.isString() ? prop.asString().toString() : "";
|
||||||
|
view.setText(text);
|
||||||
|
view.setSelection(text.length());
|
||||||
break;
|
break;
|
||||||
case "textSize":
|
case "textSize":
|
||||||
view.setTextSize(TypedValue.COMPLEX_UNIT_DIP, prop.asNumber().toFloat());
|
view.setTextSize(TypedValue.COMPLEX_UNIT_DIP, prop.asNumber().toFloat());
|
||||||
|
Reference in New Issue
Block a user