Skip to content

Instantly share code, notes, and snippets.

View Chrisvin's full-sized avatar

Chrisvin Jem Chrisvin

View GitHub Profile
@Chrisvin
Chrisvin / ViewReveal.java
Last active August 6, 2019 09:32
Hack for circular reveal animation that emulates linear reveal
/**
* 'Hack' to emulate a linear reveal using circular reveal from `ViewAnimationUtils`
*
* @param view to reveal
*/
void revealView(View view) {
int cx = view.getMeasuredWidth() * 2;
int cy = view.getMeasuredHeight() / 2;
int finalRadius = (int) Math.hypot(view.getWidth()*2, view.getHeight());