Skip to content

Instantly share code, notes, and snippets.

View FrankChanCQF's full-sized avatar
🎯
Focusing

Frankchan FrankChanCQF

🎯
Focusing
  • Guangzhou China
View GitHub Profile
@FrankChanCQF
FrankChanCQF / RevealDrawable.java
Last active August 29, 2015 14:26 — forked from rharter/RevealDrawable.java
A Drawable that transitions between two child Drawables based on this Drawable's current level value. The idea here is that the center value (5000) will show the 'selected' Drawable, and any other value will show a transitional value between the 'selected' Drawable and the 'unselected' Drawable.
package com.pixite.fragment.widget;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.view.Gravity;