Skip to content

Instantly share code, notes, and snippets.

View pipipzz's full-sized avatar

Amit Tiwari pipipzz

View GitHub Profile
@deepak786
deepak786 / InstagramLikeColorTransition.txt
Last active April 27, 2022 14:30
Instagram Like Gradient Color Transition in Android
/******This Gist explains how to create instagram like Gradient color transition in android.******/
1. Create some gradient color drawables inside drawable Folder.
a) color1.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#c44e4e"
android:endColor="#dcb9b9"
android:angle="0"/>
public class DraweeTransform extends Transition {
private static final String PROPNAME_MATRIX = "draweeTransform:matrix";
private final boolean enter;
private final ScalingUtils.ScaleType detailScale;
public DraweeTransform(ScalingUtils.ScaleType detailScale, boolean enter) {
this.detailScale = detailScale;
this.enter = enter;
}