UI set Caret position in editText control
Hello.
My task is entering Lab values with 2 digits after point to editText control.
User must use only digits, point and minus (only at the begin of string)
I write this code:
function parseTwoDigit (stringValue) {
if (stringValue== '-') {
return stringValue
}
var stringValueLocal
stringValueLocal = (parseInt ((parseFloat (stringValue)*100), 10))/100
if ((stringValueLocal+'.') == stringValue){
return stringValue
}
return stringValueLocal
}
This code work with editText.onChanging event
This code fix string, when user try to enter wrong symbol, but at this moment caret jump to the begin of the string,
How can I move caret to the end of the string in editText control?
