Add this to your project level build.gradle
:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
Add this to your app build.gradle
:
dependencies {
implementation 'com.github.edtslib:linktextview:latest'
}
The SwipeBottomView is very easy to use. Just add it to your layout like any other view.
Here's a basic implementation.
<id.co.edtslib.linktextview.LinkTextView
app:linkColor="#ff0000"
app:linkText="Syarat & Ketentuan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dengan melanjutkan, kamu menyetujui Syarat & Ketentuan layanan di Aplikasi."
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
An example is shown below.
app:linkColor="#ff0000"
app:linkText="Syarat & Ketentuan"
[string]: color of link
[reference]: the text to be in link
findViewById<LinkTextView>(R.id.textView).setOnClickListener {
Toast.makeText(this, "Hello Link", Toast.LENGTH_SHORT).show()
}