How to show Java code in a TextView?
Asked
Active
Viewed 122 times
-2
Phantômaxx
- 37,352
- 21
- 80
- 110
Priyansh Mishra
- 21
- 1
- 5
-
2Most likely, that is using a `WebView` and one of the many syntax-highlighting libraries, not `TextView`. – CommonsWare Aug 06 '17 at 12:08
1 Answers
0
you can store your code as HTML and parse HTML using HTML.fromHtml(String) to show styled HTML in your TextView. for more information, take a look at here
Mohammad Rahchamani
- 4,696
- 1
- 26
- 36
-
when i do this , the code appear like this in the format http://prntscr.com/g5h8mq – Priyansh Mishra Aug 07 '17 at 15:44