Skip to content

Commit

Permalink
更新glide-transformation库
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaosenqing committed Jun 8, 2023
1 parent 9d661a0 commit d3f482a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/build.gradle
Expand Up @@ -36,7 +36,9 @@ dependencies {

implementation project(':library')
implementation 'com.github.bumptech.glide:glide:4.11.0'
// implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'jp.wasabeef:glide-transformations:4.3.0'
// If you want to use the GPU Filters
implementation 'jp.co.cyberagent.android:gpuimage:2.1.0'

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
Expand Down
Expand Up @@ -21,6 +21,8 @@
import java.util.List;

//import jp.wasabeef.glide.transformations.CropCircleTransformation;
import jp.wasabeef.glide.transformations.BlurTransformation;
import jp.wasabeef.glide.transformations.CropCircleTransformation;
import me.khrystal.library.widget.CircleRecyclerView;
import me.khrystal.library.widget.CircularHorizontalMode;
import me.khrystal.library.widget.CircularHorizontalBTTMode;
Expand Down Expand Up @@ -171,11 +173,13 @@ else if (mItemViewMode instanceof CircularHorizontalBTTMode) {
@Override
public void onBindViewHolder(VH holder, int position) {
holder.tv.setText("Number :" + (position % mImgList.size()));
// Glide.with(getContext())

// Glide.with(requireContext())
// .load(mImgList.get(position % mImgList.size()))
// .bitmapTransform(new CropCircleTransformation(getContext()))
// .apply(RequestOptions.bitmapTransform(new BlurTransformation()))
// .into(holder.iv);
Glide.with(getContext())

Glide.with(requireContext())
.load(mImgList.get(position % mImgList.size()))
.apply(RequestOptions.circleCropTransform())
.into(holder.iv);
Expand Down

0 comments on commit d3f482a

Please sign in to comment.