Reputation: 55217
I want to build an notepad-style application on android that will have syntax highlighting. But when I search around the web, I find the syntax highlighting can be done only through use of an awt class. How could I syntax highlight in maybe a custom EditText or TextView view? I know that the release of a syntax highlighter is sort of anticipated, so I want to add my syntax highlighter on the market.
Upvotes: 2
Views: 2916
Reputation: 9569
If someone know Russian, you can read my article about this topic here. Anyway there picture and code snippets that can give you a direction. If you want to check out result, it can be found here
Upvotes: 1
Reputation: 17718
Take a look at the android.text
namespace. Specifically, you'll want either an Editable
or a Spannable
as your text format instead of strings. The android.text.style
namespace has the various kinds of markup you can apply to spans of text.
Upvotes: 3