Beautiful custom cover view libraey for android.
Step 1. Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.smith8h:SCoverView:1.0'
}
XML Attributes:
<smith.lib.views.cover.SCoverView
android:id="@+id/scoverview"
app:corners="15dp"
app:image="@drawable/img"
app:text="@string/text"
app:textColor="@android:color/white"
app:textShadeColor="@android:color/black"
app:textSize="10sp"
app:textVisibility="visible"
app:textPadding="12dp" />
You can set text visibility to visible
or gone
.
JAVA codes:
scoverview.setImageResource(...); // R.drawable.img
scoverview.setImageDrawable(...); // Drawable
scoverview.setImageBitmap(...); // Bitmap
scoverview.setTextShadeColor(Color.CYAN); // int color or resource using getColor(R.color.name)
scoverview.setTextColor(Color.BLACK); // same as textShadeColor()
scoverview.setText("Hi I'm Hussein Smith"); // string or resource R.string.text
scoverview.setTextPadding(12); // any value here will be converted automatically to its relative dp size depending on device's screen density
scoverview.setTextVisibility(Visibility.VISIBLE); // VISIBLE or GONE
scoverview.setCorners(50); // any value here will be converted automatically to its relative dp size depending on device's screen density
If you would like to support this project's further development, the creator of this projects or the continuous maintenance of the project feel free to donate. Your donation is highly appreciated. Thank you!
You can choose what you want to donate, all donations are awesome!