2

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 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.