Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manolovn/trianglify
Android view inspired by http://qrohlf.com/trianglify/
https://github.com/manolovn/trianglify
Last synced: 14 days ago
JSON representation
Android view inspired by http://qrohlf.com/trianglify/
- Host: GitHub
- URL: https://github.com/manolovn/trianglify
- Owner: manolovn
- License: apache-2.0
- Created: 2016-01-07T18:18:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-17T11:06:01.000Z (over 6 years ago)
- Last Synced: 2024-07-31T18:17:26.686Z (3 months ago)
- Language: Java
- Homepage:
- Size: 447 KB
- Stars: 458
- Watchers: 14
- Forks: 51
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- -awesome-android-ui - Trianglify - 2.0) | <img src="/art/Trianglify.png" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - Trianglify - 2.0) | <img src="/art/Trianglify.png" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - Trianglify - 2.0) | <img src="/art/Trianglify.png" width="49%"> (Index)
README
# Trianglify
[![Build Status](https://travis-ci.org/manolovn/trianglify.svg?branch=master)](https://travis-ci.org/manolovn/trianglify)
[![Maven Central](https://img.shields.io/maven-central/v/com.manolovn/trianglify.svg)](https://maven-badges.herokuapp.com/maven-central/com.manolovn/trianglify)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Trianglify-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3014)Android view inspired by http://qrohlf.com/trianglify/
# Usage
Add the dependency
```groovy
dependencies {
compile 'com.manolovn:trianglify:1.1.0'
}
```Just add the view to your layout:
```xml
```
Cell size, variance, bleeds, color generator and point generator can be initialized from layout:
```xml
```
or using setters (see sample for more info):
```java
trianglifyView.getDrawable().setCellSize(175);
trianglifyView.getDrawable().setVariance(75);
trianglifyView.getDrawable().setColorGenerator(new AnyColorGenerator());
trianglifyView.getDrawable().setPointGenerator(new AnyPointGenerator());
```In the sample, you can find an example of ColorGenerator and an example of how to use differents types of PointGenerator. In the component are included two: RegularPointGenerator (for a grid distribution) and CircularPointGenerator (for a concentric circles distribution).
# License
Copyright 2015 Manuel Vera Nieto
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 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.