Skip to content

Commit

Permalink
Updated README for Release v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PDDStudio committed Mar 23, 2017
1 parent c92221e commit 5d8b3a5
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ By default the Theme is set to *Theme.DEFAULT* and the language is set to *Langu
//change theme
highlightJsView.setTheme(Theme.ANDROID_STUDIO);
```
The library supports all themes that are included in *highlight.js version 9.9.0*
The library supports all themes that are included in *highlight.js version 9.10.0*

Browse the list of themes *[here](https://github.com/PDDStudio/highlightjs-android/tree/master/library/src/main/assets/styles)*

Expand All @@ -106,10 +106,30 @@ Browse the list of themes *[here](https://github.com/PDDStudio/highlightjs-andro
//change language
highlightJsView.setHighlightLanguage(Language.JAVA);
```
The library supports all languages that are included in *highlight.js version 9.9.0* (more than +130 languages)
The library supports all languages that are included in *highlight.js version 9.10.0* (more than +130 languages)

Browse the list of languages *[here](http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html#language-names-and-aliases)*

**Enable or disable support for zooming:**

```java
//enable or disable zooming support for HighlightJsView
//note: in case you change this during runtime don't forget to
//call highlightJsView.reload(); for the changes to apply!
highlightJsView.setZoomSupportEnabled(true);
```

**Enable or disable line numbers:**

```java
//enable or disable line numbers on the left side of the source
//note: in case you change this during runtime don't forget to
//call highlightJsView.reload(); for the changes to apply!
highlightJsView.setShowLineNumbers(enableLineNumbers);
```

By default Highlight.js does not support line numbers. However, thanks to [wcoder](https://github.com/wcoder/) and all the hard work that was put into [highlightjs-line-numbers.js](https://github.com/wcoder/highlightjs-line-numbers.js/). This made it easy for me to port and include this functionality into this library.

###Change the view's source

You can load the source you want to be highlighted by either a String containing the actual source code, a `File` object which represents the file containing the source code or an `URL` object to load the source code from a remote Url.
Expand Down

0 comments on commit 5d8b3a5

Please sign in to comment.