Skip to content Skip to sidebar Skip to footer

How To Create Animated Background Gradient Like Instagram App?

Below are screenshots of instagram app. The background keeps on transforming from one gradient to other very beautifully. I want to know how can I achieve this. IS THERE ANY COD

Solution 1:

Create a TransitionDrawable to change between two drawables that you use for the background.

<?xml version="1.0" encoding="UTF-8"?><transitionxmlns:android="http://schemas.android.com/apk/res/android"><!-- use whatever drawables you want, gradients, shapes etc--><itemandroid:drawable="@drawable/start" /><itemandroid:drawable="@drawable/end" /></transition>

Transition Drawables in Android

TransitionDrawabletrans= (TransitionDrawable) myLayout.getBackground();
trans.startTransition(2000);

Post a Comment for "How To Create Animated Background Gradient Like Instagram App?"