Skip to content

Instantly share code, notes, and snippets.

Avatar

Chrisvin Jem Chrisvin

View GitHub Profile
@Chrisvin
Chrisvin / ViewReveal.java
Last active Aug 6, 2019
Hack for circular reveal animation that emulates linear reveal
View ViewReveal.java
/**
* '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());