Android Question syntax highlighting

ksdroid

Member
Licensed User
Longtime User
Is it possible to use syntax highlighting in a edittext?

Sorry For my english
 

Mahares

Expert
Licensed User
Longtime User
I think he meant RichString library. Here is an example that will work for you:
B4X:
Dim rs As RichString
Dim txtTest as Edittext
  rs.Initialize("{Blue}ks{Blue}{Red}droid{Red}")
  rs.Color2(Colors.Blue,"{Blue}")
 
  rs.Color2(Colors.Red, "{Red}")
  rs.BackColor(Colors.Yellow,2,7) 
  txtTest.Text = rs          'will highlight droid yellow
 
Upvote 0
Top