1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-10-04 18:03:21 +08:00
* fixed #119

* update gradle files

* rename

* add sample of SupportRSBlur

* update libs

* bump up 3.3.0
This commit is contained in:
Daichi Furiya
2018-04-23 05:08:05 +09:00
committed by GitHub
parent 8c72ad64b9
commit 4818373fc5
30 changed files with 183 additions and 114 deletions

View File

@@ -29,6 +29,7 @@ public class MainActivity extends AppCompatActivity {
dataSet.add(Type.Grayscale);
dataSet.add(Type.RoundedCorners);
dataSet.add(Type.Blur);
dataSet.add(Type.SupportRSBlur);
dataSet.add(Type.Toon);
dataSet.add(Type.Sepia);
dataSet.add(Type.Contrast);

View File

@@ -9,10 +9,13 @@ 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.MultiTransformation;
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;
@@ -22,6 +25,7 @@ import jp.wasabeef.glide.transformations.CropTransformation.CropType;
import jp.wasabeef.glide.transformations.GrayscaleTransformation;
import jp.wasabeef.glide.transformations.MaskTransformation;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
import jp.wasabeef.glide.transformations.SupportRSBlurTransformation;
import jp.wasabeef.glide.transformations.gpu.BrightnessFilterTransformation;
import jp.wasabeef.glide.transformations.gpu.ContrastFilterTransformation;
import jp.wasabeef.glide.transformations.gpu.InvertFilterTransformation;
@@ -56,6 +60,7 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
Grayscale,
RoundedCorners,
Blur,
SupportRSBlur,
Toon,
Sepia,
Contrast,
@@ -163,6 +168,12 @@ public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
.apply(bitmapTransform(new BlurTransformation(25)))
.into(holder.image);
break;
case SupportRSBlur:
Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(new SupportRSBlurTransformation(25, 10)))
.into(holder.image);
break;
case Toon:
Glide.with(context)
.load(R.drawable.demo)