Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

Flowing-Gradient

> 编程语言
Open source

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

699 stars0 likes1 views
WebsiteGitHub

About

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

Flowing Gradient Library

Android ver 3.1+

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaandroidandroid-librarycolorsgradient

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言