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

Latest commit

 

History

History
76 lines (45 loc) · 1.38 KB

README.md

File metadata and controls

76 lines (45 loc) · 1.38 KB

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