BarView is a native android UI library that allows representation of data in bar graph with slick look and smooth animations. Currently the library is in a very early stage so it does not look very good 😋.
This project has been selected for GirlScript Summer of Code 2020. To begin contributing
In your project level build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
In your app level build.gradle
dependencies {
implementation 'com.github.krharsh17:barview-android:1.0'
}
XML
<in.krharsh17.barview.BarView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/barview"
app:barHeight="20"
app:valueTextSize="9"
app:labelTextSize="18"
app:labelTextColor="#424242"
app:barGroupSpacing="16"
app:rippleColor="#EEEEEE"
app:valueTextColor="#FFFFFF"
/>
Important
app:
attributes are optionalapp:
attributes are mentioned abovebarGroupSpacing
& barHeight
are in dp, while valueTextSize
& labelTextSize
are in spJava
BarView barview = findViewById(R.id.barview);
ArrayList
barModels.add(new BarModel( "label_text", "value_text", "color_hex", fill_ratio_float ) );
//Add more BarModels here..
barview.setData(barModels);
## System Requirements
- Git
- Android Studio
## Learning Resources
- https://developer.android.com/studio/install
- https://try.github.io/
The demo apk for the project is available [here](https://github.com/krharsh17/barview-android/blob/develop/demo-apk/app-debug.apk)