Skip to content

Instantly share code, notes, and snippets.

View MediaPickerView
package com.su.polo.mediapicker;
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.database.MergeCursor;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.os.AsyncTask;
import android.provider.MediaStore;
View SimpleDataBindingRecyclerAdapter
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import java.util.List;
public class SimpleDataBindingRecyclerAdapter<T> extends RecyclerView.Adapter<SimpleDataBindingRecyclerAdapter.DataBindingViewHolder> {
@pgloaguen
pgloaguen / gist:10b69882a6f721ce98f6
Last active Jun 25, 2019
PhotographicPrintAnimator realize a beautiful photographic print animation as described in the Material design spec (http://www.google.com/design/spec/patterns/loading-images.html#loading-images-loading-images)
View gist:10b69882a6f721ce98f6
import android.animation.ValueAnimator;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.ImageView;
import java.lang.ref.SoftReference;
public class PhotographicPrintAnimator {