question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimize placeholder and error

See original GitHub issue

I use the following syntax to set both the placeholder and an error:

                                    placeholder(drawable)
                                    error(drawable)

Note that they are the same. What happens though is the following:

  • Placeholder is set
  • Loading of URL fails thus setting the error drawable WHICH Is the same causing the UI to refresh

Any way we can avoid setting the drawable again if they’re the same? That would make for a nicer experience.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mariocommented, Jan 3, 2020

Yes - I’ve actually seen a similar behaviour few years back with ImageView when images were set in quick succession. Anyway, that’s a whole different matter that I’ll investigate myself - since you feel the feature request is not warranted here, I’ll go ahead and close it.

As always, thanks for being informative and friendly!

0reactions
colinrtwhitecommented, Jan 2, 2020

Hmm the image should redraw synchronously as part of the next layout pass and avoid flickering. Just to confirm you’re loading into an ImageView using imageView.load(url)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using a placeholder as a tensorflow Variable (getting Error!)
1 Answer 1 · Instead of feeding a tf.placeholder() , you could first assign a fed-in value to a variable and then optimize...
Read more >
Picasso — Placeholders, Errors, and Fading - Future Studio
Let's assume our app tries to load an image from a website, which is currently down. Picasso does give us the option to...
Read more >
Optimizing Placeholders for Q4 with Ezoic's Plugin (PST
Join Charlie as he goes over using the Ezoic plugin to optimize your placeholder setup. Ezoic Plugin Download: ...
Read more >
keep showing “placeholder” image when using elementor to ...
I've tried reproducing the issue on a sandbox environment, but no luck yet. Currently I see Autoptimize, CloudFlare + Rocket Loader and W3...
Read more >
Framer Learn: How to debug a publish or optimization warning
The best way to fix these errors is to write JavaScript that doesn't rely on browser APIs for rendering. For example, instead of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found