Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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/

Awesome Lists containing this project

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/

Demo Screenshot

# 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 at

http://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.