github-contribution-view

A custom view for showing github contributions

License

License

Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

io.github.kaustubhpatange
ArtifactId

ArtifactId

github-contribution-view
Last Version

Last Version

0.5
Release Date

Release Date

Type

Type

aar
Description

Description

github-contribution-view
A custom view for showing github contributions
Project URL

Project URL

https://github.com/KaustubhPatange/fasthub-contribution-view
Source Code Management

Source Code Management

https://github.com/KaustubhPatange/fasthub-contribution-view/tree/master

Download github-contribution-view

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.kaustubhpatange/github-contribution-view/ -->
<dependency>
    <groupId>io.github.kaustubhpatange</groupId>
    <artifactId>github-contribution-view</artifactId>
    <version>0.5</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/io.github.kaustubhpatange/github-contribution-view/
implementation 'io.github.kaustubhpatange:github-contribution-view:0.5'
// https://jarcasting.com/artifacts/io.github.kaustubhpatange/github-contribution-view/
implementation ("io.github.kaustubhpatange:github-contribution-view:0.5")
'io.github.kaustubhpatange:github-contribution-view:aar:0.5'
<dependency org="io.github.kaustubhpatange" name="github-contribution-view" rev="0.5">
  <artifact name="github-contribution-view" type="aar" />
</dependency>
@Grapes(
@Grab(group='io.github.kaustubhpatange', module='github-contribution-view', version='0.5')
)
libraryDependencies += "io.github.kaustubhpatange" % "github-contribution-view" % "0.5"
[io.github.kaustubhpatange/github-contribution-view "0.5"]

Dependencies

runtime (4)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.30
androidx.core » core-ktx jar 1.3.2
androidx.appcompat » appcompat jar 1.2.0
com.google.android.material » material jar 1.3.0

Project Modules

There are no modules declared in this project.

Github Contribution for FastHub

Maven Central

This repository maintains a custom view that shows github's contribution graph (a component made for FastHub app).

The view is optimized to handle thousands of week data & take minimum time for inflation. Run the benchmark instrumented test.

<>

<>

Above is the screenshot of this view being used in my FastHub's fork.

Usage

<com.kpstv.github.GraphView
   android:id="@+id/graphView"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"/>
  • Make a rest request to GitHub's Insight API & map the weeks data into GraphModel data class.
val weeks : List<GraphModel> = ... // serialize json
graphview.graphData = weeks
Attibutes
app:textColor Set the color of all the text including commit no & timeline text.
app:graphColor Set the color of graph.
app:lineColor Set the color of horizontal & vertical line.
app:lineThickness Set the thickness of the lines.
app:commitTextSize Set the commit no text size.
app:timelineTextSize Set the text size of (bottom) timeline text.

Download

Library is available at MavenCentral().

implementation 'io.github.kaustubhpatange:github-contribution-view:<version>'

License

Copyright 2020 Kaustubh Patange

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
0.5