Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.
/ ProteinBar Public archive

An Android Kotlin library for fully customizable Snackbars

License

Notifications You must be signed in to change notification settings

egek92/ProteinBar

Repository files navigation

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

alt text

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()

Screenshot

About

An Android Kotlin library for fully customizable Snackbars

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published