Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Feature discovery animations for Android

Since May, Google has updated their Material Design guidelines on their website. I have seen an interesting and cool design pattern in one of the new sections named Feature discovery.

I would like to implement the animation for 'discovering' the Navigation Drawer button. There is a similar animation in the last update of Google Fit, for the navigation drawer and floating action button.

As often, for Android animations, Google provide a nice and awesome UI guideline, but we don't have any further information for developing it for our own apps.

Do you know if there are native solutions with Android libraries to implement these kind of animations? If yes, is it available for below Android 5.0 (API 21) - it can be above Android 4.1+?

Edit : I made a Github project to realise the same animation. You can find it here : https://github.com/Guimareshh/Feature-discovery-animations

Thanks !

like image 705
Guimareshh Avatar asked May 26 '16 16:05

Guimareshh


1 Answers

You need to make custom animation or else you can use Ripple Effect + Reveal and set it to navigation drawer icon,

Circular Reveal Animation

void enterReveal() {     // previously invisible view     final View myView = findViewById(R.id.my_view);      // get the center for the clipping circle     int cx = myView.getMeasuredWidth() / 2;     int cy = myView.getMeasuredHeight() / 2;      // get the final radius for the clipping circle     int finalRadius = Math.max(myView.getWidth(), myView.getHeight()) / 2;      // create the animator for this view (the start radius is zero)     Animator anim =         ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);      // make the view visible and start the animation     myView.setVisibility(View.VISIBLE);     anim.start(); } 
like image 161
Aditya Vyas-Lakhan Avatar answered Oct 04 '22 11:10

Aditya Vyas-Lakhan