After updating to 2.1.0 i am facing a weird issue while scolling it is showing wrong image.Help Required mean while it is working fine with 1.4.0 #1286
Replies: 3 comments 3 replies
-
Using this library to show sticky headers in recycler view it was working fine till 1.4.0 but after updating it to 2.1.0 it is giving this weird behaviour. please guide how i can provide you with more details.i have simple recycler view adapter, populating data like this val section = items[position] as SectionItem |
Beta Was this translation helpful? Give feedback.
-
@zeeshanrasool91 The request for the item header is being cancelled automatically as the view isn't attached to a window. Due to the way you're drawing the header view you'll either need to attach it to a parent view first or update the section image request to: val context = sectionHolder.binding.imgFlag.context
val request = ImageRequest.Builder(context)
.data(section.sectionImage)
.target(onSuccess = sectionHolder.binding.imgFlag::setImageDrawable)
.build()
context.imageLoader.enqueue(request) |
Beta Was this translation helpful? Give feedback.
-
Sure thanks i will try
Regards
Zeeshan Rasool
…________________________________
From: Colin White ***@***.***>
Sent: Monday, May 23, 2022 10:44:57 PM
To: coil-kt/coil ***@***.***>
Cc: Zeeshan rasool ***@***.***>; Author ***@***.***>
Subject: Re: [coil-kt/coil] After updating to 2.1.0 i am facing a weird issue while scolling it is showing wrong image.Help Required mean while it is working fine with 1.4.0 (Discussion #1286)
The request for the item header is being cancelled automatically as the view isn't attached to a window. Due to the way you're drawing the header view you'll either need to attach it to a parent view first or update the section image request to:
val context = sectionHolder.binding.imgFlag.context
val request = ImageRequest.Builder(context)
.data(section.sectionImage)
.target(onSuccess = sectionHolder.binding.imgFlag::setImageDrawable)
.build()
context.imageLoader.enqueue(request)
—
Reply to this email directly, view it on GitHub<#1286 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABYVG6IDRYZIN4AJ7FQZYIDVLPG2TANCNFSM5WURSO2Q>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Describe the bug
A clear and concise description of what the bug is. Please enable logging and attach any stack traces. Bug reports without reproduction steps are likely to be closed.
To Reproduce
How can we reproduce this? Please attach a small project that reproduces the bug.
Logs/Screenshots
If applicable, add logs or screenshots to help explain your problem.
Version
What library version are you using? Does this occur on a specific API level or Android device?
Please refer to this video for detail.
https://drive.google.com/file/d/1mEqdh9qse72Bd7sOVaDKZSVIJsuhpfiu/view?usp=sharing
i am using simple extension method to load image imageview.load()
Beta Was this translation helpful? Give feedback.
All reactions