Select all text in TextField on android


#1

I am trying to highlight all of the text in a TextField when the user taps, I have this working in iOS using

this._input.ios.selectedTextRange = this._input.ios.textRangeFromPositionToPosition(this._input.ios.beginningOfDocument, this._input.ios.endOfDocument);

but I cannot find how to do this in Android. I tried

this._input.android.selectAll();

This executes but doesn’t highlight the text in the way I want, does anybody know the correct way to do this?

Thanks


#2

Actually this does work, but I had to wrap it in a setTimeout