Skip to content

A simple library to add gradient color to textView in android native

Notifications You must be signed in to change notification settings

veeyaarVR/SuperGradientTextView

Repository files navigation

SuperGradientTextView

A simple library to add gradient color to textView in android native

Why SuperGradientTextView?

  • You can change color of textView into gradient combination of two colors
  • You can set the orientation of gradient to either vertical or horizontal
  • Supports both kotlin and java

screen

Gradle

dependencies {
        implementation 'com.github.veeyaarVR:SuperGradientTextView:(latest version)'

}


repositories {
        jcenter()
        maven {
        url "https://jitpack.io"
        }
}

How to use?

Add Gradient text view in your xml

    <com.veeyaar.supergradienttextview.GradientTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Gradient Text View"
        app:startColor="@color/Blue"
        app:endColor="@color/Green"
        app:isVertical="false"
        />   

Attributes

  app:startColor="@color/Blue"
  app:endColor="@color/Green"

If you haven't defined any color, default color will be used (Color.BLUE, Color.GREEN)

  app:isVertical="false"

If true, it sets the gradient from left to right. Else it sets from right to left If not defined, it sets the default value as false

About

A simple library to add gradient color to textView in android native

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages