How can show c and c++ code in android using textview with syntax highlighting?


I am new to android programming.

I want to create a android app to display some c++ code.

How can I add my c++ source code to a TextView and display it with syntaxt highlighting?

I did some search in google and found this in
Android Syntax Highlighting?
but I don’t know how to add javapreetify file to android studio(1.5.1) build path.

Someone please help me.

or make a tutorial please


I’d comment on your post but I don’t have enough reputation yet…

There is some good information on this post here: Android Syntax Highlighting?, specifically this comment which has an exmaple for integrating Java Prettify with a TextView:

Adding the JAR to the build file could be accomplished with these instructions:

Answered By – snafu109

Answer Checked By – Cary Denson (AngularFixing Admin)

Leave a Reply

Your email address will not be published.