Android Code View

Android viewer for programming source code

License

License

GroupId

GroupId

com.github.chen0040
ArtifactId

ArtifactId

android-code-view
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

aar
Description

Description

Android Code View
Android viewer for programming source code
Project URL

Project URL

https://github.com/chen0040/android-code-view
Source Code Management

Source Code Management

https://github.com/chen0040/android-code-view.git

Download android-code-view

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.chen0040/android-code-view/ -->
<dependency>
    <groupId>com.github.chen0040</groupId>
    <artifactId>android-code-view</artifactId>
    <version>1.0.4</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.chen0040/android-code-view/
implementation 'com.github.chen0040:android-code-view:1.0.4'
// https://jarcasting.com/artifacts/com.github.chen0040/android-code-view/
implementation ("com.github.chen0040:android-code-view:1.0.4")
'com.github.chen0040:android-code-view:aar:1.0.4'
<dependency org="com.github.chen0040" name="android-code-view" rev="1.0.4">
  <artifact name="android-code-view" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.chen0040', module='android-code-view', version='1.0.4')
)
libraryDependencies += "com.github.chen0040" % "android-code-view" % "1.0.4"
[com.github.chen0040/android-code-view "1.0.4"]

Dependencies

compile (2)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 25.3.1
org.slf4j : slf4j-android jar 1.7.7

Project Modules

There are no modules declared in this project.

android-code-view

A code viewer with code syntax highlight for Android

Install

If you are using gradle, add the following dependency to your build.gradle file:

compile 'com.github.chen0040:android-code-view:1.0.4'

If you are using maven, add the following dependency to your POM file.

<dependency>
  <groupId>com.github.chen0040</groupId>
  <artifactId>android-code-view</artifactId>
  <version>1.0.2</version>
  <type>aar</type>
</dependency>

Usage

Include the following in your Android layout.xml file:

<com.github.chen0040.androidcodeview.SourceCodeView
android:id="@+id/codeViewer"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>

To load some java code in the codeViewer for display, add the following code in your android Activity or Fragment:

import com.github.chen0040.androidcodeview.SourceCodeView;

SourceCodeView codeView = (SourceCodeView)mainView.findViewById(R.id.codeViewer);
String javaSource="public class Program {\n\tpublic static void main(String[] args) { \n\t\tSystem.out.println(\"Hello World\"); \n }";
codeView.setCode(javaSource, "java");

Versions

Version
1.0.4
1.0.3
1.0.2
1.0.1