Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.6.0 com.facebook.drawee.view.SimpleDraweeView The set image is stretched #2777

Open
xiemy1214 opened this issue Jul 1, 2024 · 0 comments

Comments

@xiemy1214
Copy link

xiemy1214 commented Jul 1, 2024

version 2.6.0

fresco_V : "2.6.0",
"fresco-gif" : "com.facebook.fresco:animated-gif:${version.fresco_V}", "fresco-drawable" : "com.facebook.fresco:animated-drawable:${version.fresco_V}", "fresco" : "com.facebook.fresco:fresco:${version.fresco_V}", //imageLoad

import

//facebook.fresco api dependencies["fresco-gif"] api dependencies["fresco-drawable"] api dependencies.fresco

xml

` <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"

<com.facebook.drawee.view.SimpleDraweeView
        android:id="@+id/ivOrderUserAvatar"
        android:layout_width="@dimen/dp_35"
        android:layout_height="@dimen/dp_35"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:placeholderImage="@drawable/ic_account"
        fresco:failureImageScaleType="focusCrop"
        fresco:roundAsCircle="true" />

</androidx.cardview.widget.CardView> `

setImageURI

override fun convert(holder: BaseViewHolder, item: OrderDetailsInfo?) { item?.let { // oder student avatar url val ivOrderUserAvatar = holder.getView<SimpleDraweeView>(R.id.ivOrderUserAvatar) ivOrderUserAvatar.setImageURI(it.studentAvatar) ... } }

showStyle

temp01

version 2.6.0 use 'com.facebook.drawee.view.SimpleDraweeView' The set image is stretched! why! May I ask how to solve it? Thank very much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant