Github最火开源项目-三分钟学会使用Glide-Transformation
来源:互联网 发布:天津网络推广外包 编辑:程序博客网 时间:2024/06/05 12:02
结合Glide实现很炫的图片效果框架
开源项目地址:https://github.com/open-android/Glide-transformations
PS:如果觉得文章太长,你也可观看该课程的视频,亲,里面还有高清,无码的福利喔
运行效果
- 欢迎关注微信公众号
微信公众号名称:Android干货程序员
使用步骤
1. 在project的build.gradle添加如下代码(如下图)
allprojects { repositories { ... maven { url "https://jitpack.io" } }}
2. 在Module的build.gradle添加依赖
compile 'com.github.open-android:Glide-transformations:0.1.0'
3. 使用Picasso加载图片时添加显示效果
Glide.with(context) .load(url) .transform(new CropCircleTransformation())//图片最终会展示出圆形区域 .into(view);Glide-transformations 是通过Glide加载图片中通过上面的transform可以设置图片展示的效果 CropCircleTransformation是圆形效果,还有很多其他的效果模糊效果Glide.with(this).load(R.mipmap.ic_image_sample) .bitmapTransform(new BlurTransformation(this)) .into(mResultIv);圆角效果Glide.with(this).load(R.mipmap.ic_image_sample) .bitmapTransform(new RoundedCornersTransformation(this, 24, 0, RoundedCornersTransformation.CornerType.ALL)) .into(mResultIv);遮盖效果Glide.with(this).load(R.mipmap.ic_image_sample) .bitmapTransform(new MaskTransformation(this, R.mipmap.ic_launcher)) .into(mResultIv);灰度效果Glide.with(this).load(R.mipmap.ic_image_sample) .bitmapTransform(new GrayscaleTransformation(this)) .into(mResultIv);其他效果ToonFilterTransformationSepiaFilterTransformationContrastFilterTransformationInvertFilterTransformationPixelationFilterTransformationSketchFilterTransformationSwirlFilterTransformationBrightnessFilterTransformationKuwaharaFilterTransformationVignetteFilterTransformation
0 0
- Github最火开源项目-三分钟学会使用Glide-Transformation
- Glide 使用Transformation 时 placeholder、error 无效解决方法
- 三分钟学会在GitHub托管代码
- Glide框架 结合glide-transformations使用或者自己重写Transformation使用
- 三分钟学会使用log4J
- github图片加载框架glide使用介绍
- Github最火开源项目-GreenDao数据库使用
- Github最火开源项目-ormlite数据库使用
- Github最火开源项目-LitePal数据库使用
- Glide 3.7如何实现圆形Transformation
- 使用github托管项目
- loadmorerecyclerview GitHub项目使用
- 使用github管理项目
- 使用github下载项目
- 使用GitHub上传项目
- 【Github Issues】Glide Issues
- java反射详解--三分钟学会使用java反射
- Github最火开源项目-开源项目pinyin4j使用简介
- git merge 和 git rebase区别
- Oracle基本操作七:PL、SQL 定义变量,操作数据
- Python的学习笔记
- 开发工具问题QA
- 省赛C
- Github最火开源项目-三分钟学会使用Glide-Transformation
- npm、bower安装
- leetcode-399. Evaluate Division
- nios ii小实验——timer
- 记录通过网页QQ音乐获取下载地址与歌词的全过程
- TTL电平 与 RS232电平
- Git入门——一目了然的tag标签
- Java程序员最常用的Linux命令
- 个人学习书籍