Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.ayltai:Android-Lib-VerticalMarqueeTextView:'
}
dependencies {
implementation("com.github.ayltai:Android-Lib-VerticalMarqueeTextView:")
}
<dependency>
<groupId>com.github.ayltai</groupId>
<artifactId>Android-Lib-VerticalMarqueeTextView</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.ayltai" % "Android-Lib-VerticalMarqueeTextView" % ""
:dependencies [[com.github.ayltai/Android-Lib-VerticalMarqueeTextView ""]]
A custom TextView with vertical marquee effect.
<img src="https://raw.github.com/ayltai/Android-Lib-VerticalMarqueeTextView/master/screenshots/device-2014-02-22-000150.png" width="240" height="400" alt="Screenshot-1" /> <img src="https://raw.github.com/ayltai/Android-Lib-VerticalMarqueeTextView/master/screenshots/device-2014-02-22-000158.png" width="240" height="400" alt="Screenshot-2" /> <img src="https://raw.github.com/ayltai/Android-Lib-VerticalMarqueeTextView/master/screenshots/device-2014-02-22-000208.png" width="240" height="400" alt="Screenshot-3" />
This project includes an activity_example.xml to show how to use this library using XML declaration. An ExampleActivity is also included, which, however, is basically empty because you don't need to write any code!
Here is the example layout that generates the above screenshots:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:example="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_gravity="center_horizontal"
android:scaleType="centerInside"
android:src="@android:drawable/sym_def_app_icon" />
<android.lib.widget.verticalmarqueetextview.VerticalMarqueeTextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_gravity="center_horizontal"
example:marqueeSpeed="25"
example:textSize="20dp"
example:textColor="@android:color/white"
example:textStyle="bold"
example:text="The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog." />
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>