0

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

Community
  • 1
  • 1
MaxySpark
  • 555
  • 2
  • 10
  • 26

2 Answers2

2

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: https://stackoverflow.com/a/19787125/6786

Adding the JAR to the build file could be accomplished with these instructions: https://stackoverflow.com/a/16628496/6786

Community
  • 1
  • 1
snafu109
  • 582
  • 4
  • 13
0

select the text widgets -> go to properties -> put your c code in text

inyee
  • 435
  • 4
  • 12