Back to project page LollipopShowcase.
The source code is released under:
Apache License
If you think the Android project LollipopShowcase 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.mikepenz.lollipopshowcase; //from ww w.ja v a 2 s . c om import android.annotation.TargetApi; import android.graphics.Outline; import android.os.Build; import android.view.View; import android.view.ViewOutlineProvider; import android.widget.ImageButton; import android.widget.ImageView; public class Utils { /* public static void configureWindowEnterExitTransition(Window w) { Explode ex = new Explode(); ex.setInterpolator(new PathInterpolator(0.4f, 0, 1, 1)); w.setExitTransition(ex); w.setEnterTransition(ex); } */ public static void configureFab(View fabButton) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { fabButton.setOutlineProvider(new ViewOutlineProvider() { @TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override public void getOutline(View view, Outline outline) { int fabSize = view.getContext().getResources().getDimensionPixelSize(R.dimen.fab_size); outline.setOval(0, 0, fabSize, fabSize); } }); } else { ((ImageButton) fabButton).setScaleType(ImageView.ScaleType.FIT_CENTER); } } }