From 947af0d7d5f24c8bc53c2afccf859222b7d97f2d Mon Sep 17 00:00:00 2001 From: TOSHIBA Date: Mon, 25 Jun 2018 13:45:27 +0300 Subject: [PATCH] Created Test App --- .idea/vcs.xml | 6 +++++ .../syntaxviewexample/MainActivity.java | 25 +++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/java/net/cryptobrewery/syntaxviewexample/MainActivity.java b/app/src/main/java/net/cryptobrewery/syntaxviewexample/MainActivity.java index 96ed597..aaf1edb 100644 --- a/app/src/main/java/net/cryptobrewery/syntaxviewexample/MainActivity.java +++ b/app/src/main/java/net/cryptobrewery/syntaxviewexample/MainActivity.java @@ -14,10 +14,25 @@ protected void onCreate(Bundle savedInstanceState) { activity_main); SyntaxView syntax_view = findViewById(R.id.syn); - syntax_view.setBgColor("#ffffff"); - syntax_view.setPrintStatmentsColor("#931B42"); - syntax_view.setCodeTextColor("#000000"); - syntax_view.setRowNumbersBgColor("#ffffff"); - syntax_view.setRowNumbersColor("#000000"); + //this will set the color of Code Text background + syntax_view.setBgColor("#2b2b2b"); + //this will set the color of strings between " " + syntax_view.setPrintStatmentsColor("#6a8759"); + //this will set the default code text color other than programming keywords! + syntax_view.setCodeTextColor("#000000"); + //this will set programming keywords color like String,int,for,etc... + syntax_view.setKeywordsColor("#cc7832"); + //this will set the numbers color in code | ex: return 0; 0 will be colored + syntax_view.setNumbersColor("#4a85a3"); + //this will set the line number view background color at left + syntax_view.setRowNumbersBgColor("#2b2b2b"); + //this will set the color of numbers in the line number view at left + syntax_view.setRowNumbersColor("#cc7832"); + //this will set color of Annotations like super,@Nullable,etc .... + syntax_view.setAnnotationsColor("#1932F3"); + //this will set special characters color like ; + syntax_view.setSpecialCharsColor("#cc7832"); + + } }