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

https://github.com/dynamitechetan/flowing-gradient

Android Library to make a flowing gradient effect, similar to that used in Instagram Android login screen
https://github.com/dynamitechetan/flowing-gradient

android android-library colors gradient gradient-animations instagram transition

Last synced: 26 days ago
JSON representation

Android Library to make a flowing gradient effect, similar to that used in Instagram Android login screen

Awesome Lists containing this project

README

        

# Flowing Gradient Library
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Flowing--Gradient-green.svg?style=true)](https://android-arsenal.com/details/1/3984)
[![License](https://img.shields.io/badge/License-Apache%202-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![API](https://img.shields.io/badge/API-12+-blue.svg)](https://github.com/dynamitechetan/Flowing-Gradient) Android ver 3.1+
![Screenshot](screenshots/Screenshot_20160720-215934.png)
## How to use
Add these lines in your build.gradle files:
##### In your Project Level build.gradle
```gradle
repositories {
jcenter()
}
```
##### In your App Level build.gradle

```gradle
dependencies {
compile 'com.dynamitechetan.flowinggradient:flowinggradient:1.1'
}
```

# Using Maven
```maven

com.dynamitechetan.flowinggradient
flowinggradient
1.1
pom

```
## BASIC USAGE
```xml

```

To set your own gradients and transition duration using XML, you must add this line in your xml file in the first component:

```xml

```
## Making your own Gradient Animations.
Make a file like this and place it in drawable folder
```xml





```
Making a Gradient in Android
```xml


```

## USING YOUR OWN ANIMATION GRADIENTS USING XML

```xml

```

## SETTING TRANSITION DURATION USING XML
```xml

```

# Using This Library in JAVA
## BASIC USAGE

```java
RelativeLayout rl = (RelativeLayout) findViewById(R.id.rl);
FlowingGradientClass grad = new FlowingGradientClass();
grad.setBackgroundResource(R.drawable.translate)
.onRelativeLayout(rl)
.setTransitionDuration(4000)
.start();
```
####You are requested to use the methods in this order or sometimes it can end up in a null pointer exception.
```java
.onReltiveLayout() and be replaced by .onImageView() or .onLinearLayout() as per use.
```

## To set Alpha of the transition
```java
RelativeLayout rl = (RelativeLayout) findViewById(R.id.rl);
FlowingGradientClass grad = new FlowingGradientClass();
grad.setBackgroundResource(R.drawable.translate)
.onRelativeLayout(rl)
.setTransitionDuration(4000)
.setAlpha(4)
.start();
```

## License
Copyright (c) 2016 Chetan Kaushik

Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)