Android Question How to highlight parts of an EditText

Syd Wright

Well-Known Member
Licensed User
I want to highlight parts of a text that is present in an EditText ("Text1). The problem is that the EditText needs to have the focus to highlight. However, calling Text1.RequestFocus implies that Activity_Keypress no longer can intercept which buttons are pressed by the user on a physical keyboard.
In stead, the typed text is dumped into Text1.

Is there a Javascript (or other solution) that can be used to highlight text parts without the EditText having the focus?

PS
I don't want to use CSbuilder, because that involves reconstructing the entire text each time the highlight part has to be changed.
 
Top