Skip to content

A native android UI library that facilitates representation of categorical data in the form of interesting bars!

Notifications You must be signed in to change notification settings

Rohittt728/barview-android

 
 

Repository files navigation

BarView

Build status JitPack GitHub release (latest by date)

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!

Goal

Design

Current Progress

Progress

Installation

  • 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'
	}

Usage

  • 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, while valueTextSize & labelTextSize are in sp
  • 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);

About

A native android UI library that facilitates representation of categorical data in the form of interesting bars!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%