Hackernoon logoAndroid CodeView Introduction: How To Create Code Editor Application by@amrdeveloper

Android CodeView Introduction: How To Create Code Editor Application

Amr Hesham Hacker Noon profile picture

@amrdeveloperAmr Hesham

Software Engineer interested in Android Development and Programming language design

Hi I am Amr Hesham a Software Engineer, I am interested in Android Development and Compiler Design ๐Ÿ˜Ž

Last month when I was creating programming language compilers and interpreters for practice and implement creative ideas, I got an idea to create an Android Calculator app (MathScript) based on a scripting language to represent mathematics operations and functions ๐Ÿค”.

First, I have worked on the language design to be easy to use with helpful error messages and after implementing it, Itโ€™s time to work on the Android app so I need to create a Code Editor for this language with some features to be easy to use.

I have decided that the code editor should have some features to be cool and easy for everyone for examples,

  • Custom Syntax highlighter for my new scripting language.
  • AutoComplete for language keywords.
  • Error highlighter to highlight errors and warns.
  • Support multi-theme highlighter and can change the theme in runtime.
  • Easy to update the configuration to add any updates for my language.

So how should I create this Code Editor?

I have started searching for any library that can give me the ability to create this editor.

But the problem is that I want a custom needs because itโ€™s my language, not any popular programming language that people supports in their libraries, and the result of my searching is that no library will give me all that i need.

So I have thought that I should create my library to solve this problem and make it generic and anyone can customize it for his needs.

And I have created CodeView library, and the goal of it is to make it easy for anyone to create custom Code Editor and to be small and not include configuration for every programming or every theme, so the idea is to give you the kernel and you can customize it as you want.

It can support any programming language syntax and even you can use it to highlight links, emails, and hashtags like social media editors, you can support auto-complete easily but add your keywords and the library has a default tokenizer and you can change it too ๐Ÿ˜‹, You can support any number of themes and can move between them in the runtime fast and easy, You can support any types of errors highlighter like error, warn, tipsโ€ฆetc, You can implement some cool features that you love for example highlighter TODO, FIX comment like JetBrains editors.


Itโ€™s very easy to use, well documented, has many examples on Github you can know how to download and use it from the Github link: CodeView.

and I hope you will enjoy creating your editor with CodeView ๐Ÿ˜‹.

Previously published at https://itnext.io/android-codeview-an-easy-way-to-create-code-editor-app-5d67c3534f84


Join Hacker Noon

Create your free account to unlock your custom reading experience.