A customizable Android TextView to show corner labels like SALE, NEW, etc. Easily add labels to your views without complex layouts. A fully customizable Corner Label TextView for Android β Add stylish corner labels to your TextViews with just a few XML attributes!
![]() |
![]() |
![]() |
![]() |
- πΉ Add corner labels to TextViews
- π¨ Customize label text, size, color, background
βοΈ Choose between left or right corner- πͺΆ Lightweight, no heavy dependencies
repositories {
mavenCentral()
}β‘οΈ Gradle (Groovy)
dependencies {
implementation 'io.github.praveensinghshekhawat:cornerlabeltextview:1.0.2'
}β‘οΈ Gradle (Kotlin DSL)
dependencies {
implementation("io.github.praveensinghshekhawat:cornerlabeltextview:1.0.2")
}XML Example:
<io.github.praveensinghshekhawat.CornerLabelTextview
android:id="@+id/txt1"
android:layout_height="100dp"
android:layout_width="100dp"
app:cornerLabelBackgroundColor="@color/black"
app:cornerLabelLength="30dp"
app:cornerLabelMode="left"
app:cornerLabelText="CornerLabel"
app:cornerLabelTextColor="@color/white"
app:cornerLabelTextSize="10sp" />Java Example:
CornerLabelTextview stv = (CornerLabelTextview) findViewById(R.id.txt1);
stv.setText("CornerLabel")
.setTextColor(Color.WHITE)
.setCornerLabelBackgroundColor(Color.BLACK)
.setTextSize(18)
.setCornerLabelLength(50)
.setMode(CornerLabelTextview.LabelMode.MODE_LEFT);| Attribute | Description |
|---|---|
cornerLabelText |
Text inside the label |
cornerLabelTextSize |
Size of label text |
cornerLabelTextColor |
Label text color |
cornerLabelBackgroundColor |
Label background color |
cornerLabelLength |
Length of the label (in dp) |
cornerLabelMode |
left,left_bottom,right,right_bottom,left_triangle,left_bottom_triangle,right_triangle,right_bottom_triangle |
minSdkVersion: 24compileSdkVersion: 34Java: 11 or above
πβ Praveen Singh Shekhawat
π§ praveensinghshekhawat8@gmail.com
π GitHub Profile
π LinkedIn Profile
If you found this library helpful, consider buying me a coffee π
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.





