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
- Go through the guidelines
- Fork a copy of the project to your profile
- Go through the issues and comment on one to get it assigned to yourself
- Discuss on the gitter or slack channel if you have any doubts
- Make the changes in code and create a PR on the main repository
- Ask for a review from a mentor/admin and wait until your code gets merged!
- 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
- All
app:
attributes are optional - The default values of
app:
attributes are mentioned above barGroupSpacing
&barHeight
are in dp, whilevalueTextSize
&labelTextSize
are in sp
- All
-
Java
BarView barview = findViewById(R.id.barview);
ArrayList<BarModel> barModels = new ArrayList<>();
barModels.add(new BarModel(
"label_text",
"value_text",
"color_hex",
fill_ratio_float
)
);
//Add more BarModels here..
barview.setData(barModels);