© 2018 Dark Tornado, All rights reserved.
You can highlight your source code in EditText.
It support only reserved words in Javascript, but you can add reserved word by using .addReservedWord(); method, remove reserved word by using .removeReservedWord(); method.
EditText에 있는 소스코드를 하이라이팅할 수 있습니다.
예약어들은 자바스크립트에 있는 예약어들만 지원하며, addReservedWord(); 메소드로 하이라이팅될 예약어를 추가하거나, .removeReservedWord(); 메소드로 삭제하는 것이 가능합니다.
-
Download .jar file.
.jar 파일을 다운로드 받습니다. -
Add .jar file to libs folder in your project.
.jar 파일을 프로젝트 폴더 안에 있는 libs 폴더에 넣습니다.
-
Right-Click .jar file and click "Add As Linbrary...".
.jar 파일을 우클릭해서 Add As Linbrary... 클릭.
-
Then, it will be added to gradle, too.
그러면 이렇게 알아서 gradle에도 추가됩니다.
import com.darktornado.CodeHighlighter
- new CodeHighlighter();
Create CodeHighlighter instance.
CodeHighlighter 인스턴스 생성
-
String CodeHighlighter.VERSION
CodeHighlighter's Version.
CodeHighlighter의 버전. -
String CodeHighlighter.DEVELOPER
CodeHighlighter's Developer's Name.
CodeHighlighter의 개발자의 이름. -
void .addReservedWord(String word);
Add reserved word to highlight.
하이라이팅할 예약어 추가. -
void .addReservedWord(String word, int color);
Add reserved word to highlight. Can choose highlight color.
하이라이팅할 예약어 추가. 하이라이팅 색상도 선택 가능. -
void .removeReservedWord(String word);
Remove reserved word from list which will be highlight(?).
하이라이팅될 예약어 목록에서 해당 예약어 삭제. -
void .clearReservedWord();
Clear reserved words to highlight.
하이라이팅할 모든 예약어 삭제. -
void .setReservedWordHighlightColor(int color);
Set highlight color that will be applied to reserved word. It will not be applied to reserved word that was added by using .addReservedWord(String word, int color);
예약어 하이라이팅에 사용될 색상 설정. .addReservedWord(String word, int color);로 추가한 예약어에는 적용되지 않음. -
void .setNumberHighlightColor(int color);
Set highlight color that will be applied to number.
숫자 하이라이팅에 사용될 색상 설정. -
void .setStringHighlightColor(int color);
Set highlight color that will be applied to string.
문자열 하이라이팅에 사용될 색상 설정. -
void .setAnnotationHighlightColor(int color);
Set highlight color that will be applied to annotation.
주석 하이라이팅에 사용될 색상 설정. -
void .apply(Editable s);
Apply Highlighting
하이라이팅 적용
- Using .jar File → Allowed. You should write as "Code Highlighter made by Dark Tornado is used." in your product(?). It just has to include Library's name and Developer.
- Editing Source Code → Allowed.
- Editing Source Code and Distribution → Contact to Developer First
- Commercial Use → Contact to Developer First
- .jar 파일 사용 → 허용. 결과물에 "Dark Tornado가 만든 Code Highlighter가 사용되었습니다."와 같이 표기. 라이브러리(?) 이름이랑 만든사람만 포함되면 됨.
- 소스 코드 수정 → 허용
- 소스 코드 수정 후 배포 → 개발자에게 미리 연락
- 상업적 이용 → 개발자에게 미리 연락