https://github.com/kaustubhpatange/fasthub-contribution-view
A custom view made for FastHub app that shows github's contribution graph
https://github.com/kaustubhpatange/fasthub-contribution-view
Last synced: 3 months ago
JSON representation
A custom view made for FastHub app that shows github's contribution graph
- Host: GitHub
- URL: https://github.com/kaustubhpatange/fasthub-contribution-view
- Owner: KaustubhPatange
- License: apache-2.0
- Created: 2021-03-13T07:19:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T10:31:52.000Z (over 4 years ago)
- Last Synced: 2025-04-23T16:27:57.060Z (6 months ago)
- Language: Kotlin
- Size: 189 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Contribution for FastHub

This repository maintains a custom view that shows github's contribution graph (a component made for [FastHub](https://github.com/k0shk0sh/FastHub) app).
The view is optimized to handle thousands of week data & take minimum time for inflation. Run the benchmark [instrumented test](https://github.com/KaustubhPatange/fasthub-contribution-view/blob/master/sample/src/androidTest/java/com/kpstv/github_sample/BenchmarkTest.kt).
<>
<>
Above is the screenshot of this view being used in my FastHub's [fork](https://github.com/KaustubhPatange/FastHub).
## Usage
```xml
```
- Make a rest request to GitHub's Insight API & map the weeks data into `GraphModel` data class.
```kotlin
val weeks : List = ... // 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()`.
```groovy
implementation 'io.github.kaustubhpatange:github-contribution-view:'
```## License
- [The Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
```
Copyright 2020 Kaustubh PatangeLicensed 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 athttps://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.
```