Skip to content

Commit 7955cdc

Browse files
committed
Update README.md
1 parent 4a7cdf5 commit 7955cdc

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,21 @@ allprojects {
1616
```
1717
Add the dependency:
1818
```gradle
19-
compile 'com.github.tiagohm:CodeView:0.1.1
19+
compile 'com.github.tiagohm:CodeView:0.1.2
2020
```
2121

22+
## Highlighters
23+
* [HIGHLIGHT.JS](https://highlightjs.org/)
24+
169 languages and 77 styles
25+
* [PRISM](http://prismjs.com/)
26+
120 languages
27+
* [RAINBOW](https://craig.is/making/rainbows)
28+
19 languages
29+
30+
## Other Links
31+
* [https://github.com/Blender3D/rainbow.linenumbers.js](https://github.com/Blender3D/rainbow.linenumbers.js)
32+
* [https://github.com/wcoder/highlightjs-line-numbers.js/](https://github.com/wcoder/highlightjs-line-numbers.js/)
33+
2234
## Usage
2335

2436
Add view to your layout:
@@ -31,7 +43,7 @@ Add view to your layout:
3143
```java
3244
final CodeView cv = (CodeView)findViewById(R.id.code_view);
3345

34-
//Using HighlightJs
46+
//Using Highlight.js
3547
cv.setSyntaxHighlighter(new HightlightJs())
3648
.setCode("Your code")
3749
.setLanguage(HightlightJs.Languages.JAVA)
@@ -47,10 +59,23 @@ Add view to your layout:
4759
.setShowLineNumber(true)
4860
.setTextSize(12)
4961
.apply();
62+
//Or using Rainbow
63+
cv.setSyntaxHighlighter(new Rainbow())
64+
.setCode("Your code")
65+
.setLanguage(Rainbow.Languages.JAVA)
66+
.setTheme(Rainbow.Themes.GITHUB)
67+
.setShowLineNumber(true)
68+
.setTextSize(12)
69+
.apply();
5070
```
51-
71+
72+
Highlight.js
73+
![](https://raw.githubusercontent.com/tiagohm/CodeView/master/1.png)
74+
Prism.js
5275
![](https://raw.githubusercontent.com/tiagohm/CodeView/master/3.png)
53-
76+
Rainbow
77+
![](https://raw.githubusercontent.com/tiagohm/CodeView/master/2.png)
78+
5479
## LICENSE
5580
Copyright 2016-2017 tiagohm
5681

0 commit comments

Comments
 (0)