🧩 A lightweight and customizable Android library for displaying a main title with a subtext — perfect for lists, settings screens, or profile sections.
It supports custom text styles, colors, and drawables (start & end) with flexible padding, making your UI cleaner and more elegant.
gradle
maven { url = uri("https://jitpack.io") }
gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") } // Now paste here
}
}
Groovy DSL
implementation 'com.github.JoyRay0:TextWithSubText:$release Version'
Kotlin DSL
implementation("com.github.JoyRay0:TextWithSubText:$release version")
<com.rk_softwares.textwithsubtext.TextWithSubText
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:mainText="Hello"
app:mainTextSize="14sp"
app:mainTextColor="#000"
app:mainTextStyle="bold"
app:subText="World"
app:subTextSize="12sp"
app:subTextColor="#625959"
app:subTextStyle="bold"
app:drawableStart="@drawable/ic_android"
app:drawableEnd="@drawable/ic_forward_"
app:drawablePadding="10dp"
/>
java
TextWithSubText text = findViewById(R.id.text);
text.setMainText("Hello")
text.setSubText("World")
text.setMainTextColor("#000000")
text.setSubTextColor("#000000")
text.setMainTextSize(30)
text.setSubTextSize(20)
text.setMainTextStyle(Typeface.BOLD)
text.setSubTextStyle(Typeface.NORMAL)
kotlin
val text: TextWithSubText = findViewById(R.id.text)
text.setMainText("Hello")
text.setSubText("World")
text.setMainTextColor("#000000")
text.setSubTextColor("#000000")
text.setMainTextSize(30)
text.setSubTextSize(20)
text.setMainTextStyle(Typeface.BOLD)
text.setSubTextStyle(Typeface.NORMAL)
I would like to express my heartfelt thanks to everyone who uses or contributes to TextWithSubText. Your support, feedback, and contributions inspire me to make this library even better.
Every suggestion, bug report, and pull request helps this project grow stronger. Together, we’re building something simple, elegant, and useful for the Android community.
💬 Thank you for being a part of this journey — your encouragement means the world! 🌍💫
MIT License — Use freely in your projects, commercial or personal.
