1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-10-04 09:53:21 +08:00
This commit is contained in:
wasabeef
2015-09-16 22:38:16 +09:00
parent 831f038d29
commit 5cf3e3d934
4 changed files with 129 additions and 124 deletions

View File

@@ -9,13 +9,10 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import java.util.List;
import jp.wasabeef.glide.transformations.BlurTransformation;
import jp.wasabeef.glide.transformations.ColorFilterTransformation;
import jp.wasabeef.glide.transformations.CropCircleTransformation;
@@ -84,18 +81,18 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
case Mask:
transformation = new MaskTransformation(mContext, R.drawable.mask210);
Glide.with(mContext)
.load(R.drawable.demo)
.override(210, 210)
.bitmapTransform(new CenterCrop(mContext), transformation)
.into(holder.image);
.load(R.drawable.demo)
.override(210, 210)
.bitmapTransform(new CenterCrop(mContext), transformation)
.into(holder.image);
break;
case NinePatchMask:
transformation = new NinePatchMaskTransformation(mContext, R.drawable.chat_me_mask, 300, 300);
transformation = new NinePatchMaskTransformation(mContext, R.drawable.chat_me_mask);
Glide.with(mContext)
.load(R.drawable.demo)
.override(300, 300)
.bitmapTransform(new CenterCrop(mContext), transformation)
.into(holder.image);
.load(R.drawable.demo)
.override(300, 300)
.bitmapTransform(new CenterCrop(mContext), transformation)
.into(holder.image);
break;
case CropTop:
transformation =