Back to project page SlidingMenuLibrary.
The source code is released under:
Apache License
If you think the Android project SlidingMenuLibrary listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jeremyfeinstein.slidingmenu.example.anim; /*from w w w .j ava 2 s . c om*/ import android.graphics.Canvas; import com.jeremyfeinstein.slidingmenu.example.R; import com.jeremyfeinstein.slidingmenu.example.R.string; import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; public class CustomZoomAnimation extends CustomAnimation { public CustomZoomAnimation() { // see the class CustomAnimation for how to attach // the CanvasTransformer to the SlidingMenu super(R.string.anim_zoom, new CanvasTransformer() { @Override public void transformCanvas(Canvas canvas, float percentOpen) { float scale = (float) (percentOpen*0.25 + 0.75); canvas.scale(scale, scale, canvas.getWidth()/2, canvas.getHeight()/2); } }); } }