Android Open Source - LollipopShowcase Utils






From Project

Back to project page LollipopShowcase.

License

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.

Java Source Code

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);
        }
    }
}




Java Source Code List

com.mikepenz.lollipopshowcase.AnimListener.java
com.mikepenz.lollipopshowcase.DetailActivity.java
com.mikepenz.lollipopshowcase.MainActivity.java
com.mikepenz.lollipopshowcase.Utils.java
com.mikepenz.lollipopshowcase.adapter.ApplicationAdapter.java
com.mikepenz.lollipopshowcase.entity.AppInfo.java
com.mikepenz.lollipopshowcase.itemanimator.CustomItemAnimator.java
com.mikepenz.lollipopshowcase.itemanimator.ReboundItemAnimator.java
com.mikepenz.lollipopshowcase.util.Network.java
com.mikepenz.lollipopshowcase.util.UploadHelper.java