ProteinBar
ProteinBar copied to clipboard
An Android Kotlin library for fully customizable Snackbars
Download
in your root build.gradle
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
in your app level build.gradle
dependencies {
...
implementation 'com.github.egek92:ProteinBar:1.4'
}
Usage Example

Complete List of Methods
-
text("example"): set text -
textSize(12): set text size -
textStyle(textStyle.BOLD): define text style -
textColor(Color.parseColor("#FFFFFF")): set text color -
duration(Protein.LENGTH_SHORT): ProteinBar display duration -
icon(R.drawable.icon): set icon -
backgroundcolor(Color.parseColor("#FFFFFF")): set background color -
centerText(): allign text to center
alternatively you can use pre-made action ProteinBars
success()
info()
warning()
error()
Protein.builder()
.setActivity(this)
.text("Hippity hoppity get off my property!")
.backgroundColor(Color.parseColor("#00ff00"))
.icon(R.drawable.frog)
.show()
