Skip to content

vibexie/Battery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple BatteryView for Android

For gradle:

Step 1. Add the JitPack repository in your root build.gradle at the end of repositories:

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

compile 'com.github.vibexie:Battery:v1.0'

Step 3. Use like this

<com.vibexie.batterylib.BatteryView
        android:id="@+id/bv"
        android:layout_width="100dp"
        android:layout_height="200dp"
        mv:shellWidth="10dp"
        mv:shellColor="#5C5C5C"
        mv:powerColor="#5CACEE"
        mv:amountColor="#EE4000"
        mv:amountTextSize="20sp"
        android:layout_centerInParent="true"/>

Then use setmPowerAmount(int Amount) method.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages