mirror of
https://github.com/wasabeef/glide-transformations.git
synced 2025-06-14 03:26:56 +08:00
bump up 1.2.1
This commit is contained in:
parent
113200de55
commit
4629d5e375
@ -32,7 +32,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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
|
// If you want to use the GPU Filters
|
||||||
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
|
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.3.1'
|
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
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
@ -75,7 +75,7 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
|
|||||||
|
|
||||||
@Override public void onBindViewHolder(MainAdapter.ViewHolder holder, int position) {
|
@Override public void onBindViewHolder(MainAdapter.ViewHolder holder, int position) {
|
||||||
switch (mDataSet.get(position)) {
|
switch (mDataSet.get(position)) {
|
||||||
case Mask:
|
case Mask: {
|
||||||
int width = Utils.dip2px(mContext, 133.33f);
|
int width = Utils.dip2px(mContext, 133.33f);
|
||||||
int height = Utils.dip2px(mContext, 126.33f);
|
int height = Utils.dip2px(mContext, 126.33f);
|
||||||
Glide.with(mContext)
|
Glide.with(mContext)
|
||||||
@ -85,9 +85,10 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
|
|||||||
new MaskTransformation(mContext, R.drawable.mask_starfish))
|
new MaskTransformation(mContext, R.drawable.mask_starfish))
|
||||||
.into(holder.image);
|
.into(holder.image);
|
||||||
break;
|
break;
|
||||||
case NinePatchMask:
|
}
|
||||||
width = Utils.dip2px(mContext, 150.0f);
|
case NinePatchMask: {
|
||||||
height = Utils.dip2px(mContext, 100.0f);
|
int width = Utils.dip2px(mContext, 150.0f);
|
||||||
|
int height = Utils.dip2px(mContext, 100.0f);
|
||||||
Glide.with(mContext)
|
Glide.with(mContext)
|
||||||
.load(R.drawable.check)
|
.load(R.drawable.check)
|
||||||
.override(width, height)
|
.override(width, height)
|
||||||
@ -95,6 +96,7 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
|
|||||||
new MaskTransformation(mContext, R.drawable.mask_chat_right))
|
new MaskTransformation(mContext, R.drawable.mask_chat_right))
|
||||||
.into(holder.image);
|
.into(holder.image);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case CropTop:
|
case CropTop:
|
||||||
Glide.with(mContext)
|
Glide.with(mContext)
|
||||||
.load(R.drawable.demo)
|
.load(R.drawable.demo)
|
||||||
|
@ -20,8 +20,8 @@ import android.content.Context;
|
|||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
|
|
||||||
public static int dip2px(Context context, float dp) {
|
public static int dip2px(Context context, float dp) {
|
||||||
float scale = context.getResources().getDisplayMetrics().density;
|
float scale = context.getResources().getDisplayMetrics().density;
|
||||||
return (int) (dp * scale + 0.5f);
|
return (int) (dp * scale + 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user