CustomTextView is a Customizable text view component that can use on Android. This component is a child of AppCompatTextView
and almost all functionalities are inherited from TextView
. Using the CustomTextView
component, you can add a dotted underline and that can be customized.
CustomTextView is available on mavenCentral()
.
implementation 'io.github.ejchathuranga:custom-textview:1.1.1'
implementation("io.github.ejchathuranga:custom-textview:1.1.1")
<io.github.ejchathuranga.ctv.CustomTextView
android:id="@+id/ctv"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ctvUnderlineColor="0xFFFF00FF"
app:ctvUnderlinePadding="20"
app:ctvUnderLineDotWidth="40"
app:ctvUnderLineDotSpace="20" />
CustomTextView ctv = findViewById(R.id.ctv);
ctv.setUnderLineColor(0xFFFF00FF);
ctv.setUnderlineDotWidthAndSpace(55f, 5f);
ctv.setUnderlineThickness(55);
ctv.setUnderlinePadding(30);
ctv.reset();