Select all text in TextField on android


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 executes but doesn’t highlight the text in the way I want, does anybody know the correct way to do this?



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