ProteinBar

General

Category
Free
Tag
Snackbars
License
N/A
Registered
Nov 14, 2017
Favorites
1
Link
https://github.com/egek92/ProteinBar
See also
SnackbarBuilder
SnackEngage
LGSnackbar
BindingSnackbar
Restaurant

Additional

Language
Kotlin
Version
1.4 (Nov 3, 2017)
Created
Nov 3, 2017
Updated
Nov 3, 2017
Owner
Ege Kuzubasioglu (egek92)
Contributor
Ege Kuzubasioglu (egek92)
1
Activity
Badge
Generate
Download
Source code

Advertisement

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