Color Statistics for Android based on a Material Up showcase designed by Someone
Original showcase image from Someone
dependencies {
compile 'info.kimjihyok:color-statistics-view:0.1.0'
}
<info.kimjihyok.coloverstatisticsview.ColorStatisticsView
android:id="@+id/colorStatsView"
android:layout_width="match_parent"
android:layout_height="200dp">
</info.kimjihyok.coloverstatisticsview.ColorStatisticsView>
colorStatsView = (ColorStatisticsView) findViewById(R.id.colorStatsView);
colorStatsView.setBackgroundColor(ContextCompat.getColor(this, R.color.colorPrimary));
colorStatsView.setTitleText("Diary Topics");
colorStatsView.setFontColor(ContextCompat.getColor(this, R.color.white));
colorStatsView.setFontSize(22);
colorStatsView.setStatisticsItems(getDummyData());
// to update values
colorStatsView/.setStatValue(position, value);
private List<StatisticsData> getTestData() {
List<StatisticsData> resultData = new ArrayList<>();
StatisticsData dataOne = new StatisticsData();
dataOne.setItemName("Reading");
dataOne.setCircleColor(ContextCompat.getColor(this, R.color.readingColor));
dataOne.setStatisticsCount(4);
...
resultData.add(dataOne);
...
return resultData;
}
- Please help me update this link. I saw it on Material Up, but lost the link and can't find him!