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.
+2
A:
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.
Yuliy
2010-03-28 17:53:05