GitDiffTextView

With this android library you are able to display DIFF in a TextView.

License

License

Categories

Categories

ORM Data
GroupId

GroupId

com.github.alorma
ArtifactId

ArtifactId

diff-textview
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

aar
Description

Description

GitDiffTextView
With this android library you are able to display DIFF in a TextView.

Download diff-textview

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
com.android.support » support-annotations jar 21.0.3

Project Modules

There are no modules declared in this project.

GitDiffTextView

With this android library you are able to display DIFF in a TextView.

GitDiffTextView

Usage

Add dependency to your build.gradle file:

    dependencies {
        compile 'com.github.alorma:diff-textview:1.3.0'
    }

Add GitDiffTextView to your layout:

<com.alorma.diff.lib.DiffTextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/diffTextView"/>

Add diff text:

DiffTextView diffTextView = (DiffTextView) findViewById(R.id.diffTextView);

String diffText = "@@ -29,6 +29,7 @@
        android:resource=\"@xml/searchable_repos\" />
    </activity>
    <activity android:name=\"com.alorma.github.ui.activity.ProfileActivity\" />
+   <activity android:name=\"com.alorma.github.ui.activity.CommitDetailActivity\" />
    <activity android:name=\"com.alorma.github.ui.activity.RepoDetailActivity\" />
    <activity android:name=\"com.alorma.github.ui.dialog.NewIssueCommentDialog\" />
-   <activity android:name=\"com.alorma.github.ui.activity.FileActivity\" />";

diffTextView.setMaxLines(5);

diffTextView.setText(diffText);

Versions

Version
1.1.0
1.0.0