Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/txusballesteros/snake
Snake View is a simple and animated linear chart for Android.
https://github.com/txusballesteros/snake
Last synced: 10 days ago
JSON representation
Snake View is a simple and animated linear chart for Android.
- Host: GitHub
- URL: https://github.com/txusballesteros/snake
- Owner: txusballesteros
- Created: 2015-10-12T07:59:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-23T12:20:46.000Z (almost 9 years ago)
- Last Synced: 2024-07-31T18:17:27.938Z (3 months ago)
- Language: Java
- Homepage:
- Size: 1.5 MB
- Stars: 340
- Watchers: 11
- Forks: 47
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- -awesome-android-ui - Snake View - 2.0) | <img src="/art/snake.gif" width="60%"> (Index `(light-weight pages)`)
- awesome-android-ui - Snake View - 2.0) | <img src="/art/snake.gif" width="60%"> (Index `(light-weight pages)`)
- awesome-android-ui - Snake View - 2.0) | <img src="/art/snake.gif" width="60%"> (Index)
README
Snake View
=====================![](assets/demo.gif)
Snake library is a simple and animation line chart for Android.
## Latest Version
[ ![Download](https://api.bintray.com/packages/txusballesteros/maven/Snake/images/download.svg) ](https://bintray.com/txusballesteros/maven/Snake/_latestVersion) ![](https://img.shields.io/badge/platform-android-green.svg) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Snake-green.svg?style=flat)](https://android-arsenal.com/details/1/2675)
## How to use
### Configuring your project dependencies
Add the library dependency to your build.gradle file.
```groovy
dependencies {
...
compile 'com.txusballesteros:snake:1.0'
}
```### Adding the view to your layout
Add the view to your xml layout file.
```xml
```
### Setting the values
Setting the minimum and maximum values of the scale of the chart.
```java
final SnakeView snakeView = (SnakeView)findViewById(R.id.snake);
snakeView.setMinValue(0);
snakeView.setMaxValue(100);
```Adding values to the chart.
```java
final SnakeView snakeView = (SnakeView)findViewById(R.id.snake);
snakeView.addValue(100);
```## License
Copyright Txus Ballesteros 2015 (@txusballesteros)
This file is part of some open source application.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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 athttp://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.Contact: Txus Ballesteros