1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-06-10 08:34:04 +08:00

bump up 1.2.1

This commit is contained in:
wasabeef 2015-09-18 15:32:51 +09:00
parent 113200de55
commit 4629d5e375
4 changed files with 12 additions and 10 deletions

View File

@ -32,7 +32,7 @@ repositories {
}
dependencies {
compile 'jp.wasabeef:glide-transformations:1.2.0'
compile 'jp.wasabeef:glide-transformations:1.2.1'
// If you want to use the GPU Filters
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
}

View File

@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -75,7 +75,7 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
@Override public void onBindViewHolder(MainAdapter.ViewHolder holder, int position) {
switch (mDataSet.get(position)) {
case Mask:
case Mask: {
int width = Utils.dip2px(mContext, 133.33f);
int height = Utils.dip2px(mContext, 126.33f);
Glide.with(mContext)
@ -85,9 +85,10 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
new MaskTransformation(mContext, R.drawable.mask_starfish))
.into(holder.image);
break;
case NinePatchMask:
width = Utils.dip2px(mContext, 150.0f);
height = Utils.dip2px(mContext, 100.0f);
}
case NinePatchMask: {
int width = Utils.dip2px(mContext, 150.0f);
int height = Utils.dip2px(mContext, 100.0f);
Glide.with(mContext)
.load(R.drawable.check)
.override(width, height)
@ -95,6 +96,7 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
new MaskTransformation(mContext, R.drawable.mask_chat_right))
.into(holder.image);
break;
}
case CropTop:
Glide.with(mContext)
.load(R.drawable.demo)

View File

@ -20,8 +20,8 @@ import android.content.Context;
public class Utils {
public static int dip2px(Context context, float dp) {
float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5f);
}
public static int dip2px(Context context, float dp) {
float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5f);
}
}