Android Library to make a flowing gradient effect, similar to that used in Instagram Android login screen
Android Library to make a flowing gradient effect, similar to that used in Instagram Android login screen
Android ver 3.1+
Add these lines in your build.gradle files:
repositories {
jcenter()
}dependencies {
compile 'com.dynamitechetan.flowinggradient:flowinggradient:1.1'
}
com.dynamitechetan.flowinggradient
flowinggradient
1.1
pom
To set your own gradients and transition duration using XML, you must add this line in your xml file in the first component:
Make a file like this and place it in drawable folder
Making a Gradient in Android
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.
.onReltiveLayout() and be replaced by .onImageView() or .onLinearLayout() as per use. RelativeLayout rl = (RelativeLayout) findViewById(R.id.rl);
FlowingGradientClass grad = new FlowingGradientClass();
grad.setBackgroundResource(R.drawable.translate)
.onRelativeLayout(rl)
.setTransitionDuration(4000)
.setAlpha(4)
.start();Copyright (c) 2016 Chetan Kaushik
Licensed under the Apache License, Version 2.0
No open issues yet, or sync has not completed.