Skip to content

Instantly share code, notes, and snippets.

@willblaschko
willblaschko / LocationBitmapTransformation.java
Last active September 19, 2016 05:17
A Glide transformation to set the center of the crop()--similar to cropCenter(). This only affects the overflow dimension, not the fit dimension.
/**
*
* Most of this from:
* https://github.com/bumptech/glide/blob/master/library/src/main/java/com/bumptech/glide/load/resource/bitmap/CenterCrop.java
* and
* https://github.com/bumptech/glide/blob/master/library/src/main/java/com/bumptech/glide/load/resource/bitmap/TransformationUtils.java
*
* Created by wblaschko on 3/31/16.
*/
public class LocationBitmapTransformation extends BitmapTransformation {
public class CustomAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
//our items
List<Generic> items = new Arraylist<>();
//headers
List<View> headers = new ArrayList<>();
//footers
List<View> footers = new ArrayList<>();
public static final int TYPE_HEADER = 111;
public static final int TYPE_FOOTER = 222;