Glide: centerCrop not work combile with RoundedCorners in Glide 4.3.0

Created on 2 Nov 2017  路  1Comment  路  Source: bumptech/glide


Glide Version:4.3.0


Integration libraries:com.github.bumptech.glide:okhttp3-integration:4.3.0


Device/Android Version:Smartisam SM901 android 6.0.1


Issue details / Repro steps / Use case background:
centerCrop not work combile with RoundedCorners
RoundedCorner work, but centerCrop not work.
if my change order, centerCrop work, but RoundedCorner not work


Glide load line / GlideModule (if any) / list Adapter code (if any):

GlideApp.with(this)
                    .load(url)
                    .placeholder(LoadingColorManager.getHotItemDrawable())
                    .centerCrop()
                    .transform(mRoundCornetTransform)
                    .into(imageView);

RoundedCorners mRoundCornetTransform = new RoundedCorners(
         BaseApplication.getApplication().getResources().getDimensionPixelSize(R.dimen.community_hot_item_radius));


Layout XML:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:foreground="?android:attr/selectableItemBackground"
    android:layout_width="match_parent"
    android:layout_height="210dp">

    <ImageView
        android:id="@+id/iv_cover"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <ImageView
        android:id="@+id/iv_icon"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <ImageView
        android:id="@+id/iv_magazine_icon"
        android:layout_marginLeft="6dp"
        android:layout_marginTop="12dp"
        android:src="@drawable/community_detail_magazine_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/tv_magazine"
        android:layout_marginTop="8dp"
        android:ellipsize="end"
        android:layout_marginLeft="30dp"
        android:layout_marginRight="15dp"
        android:maxLines="2"
        android:textColor="@android:color/white"
        android:textSize="18dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</FrameLayout>


device-2017-11-02-174623


Stack trace / LogCat:

paste stack trace and/or log here
question

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrFuFuFu picture MrFuFuFu  路  3Comments

technoir42 picture technoir42  路  3Comments

FooBarBacon picture FooBarBacon  路  3Comments

kenneth2008 picture kenneth2008  路  3Comments

Anton111111 picture Anton111111  路  3Comments