Skip to content

Conversation

@laurencedawson
Copy link
Contributor

It would be quite handy to see at a glance if the view has an image set.

I'm doing this by checking if the uri is set or the view has has a bitmap set.

@davemorrissey
Copy link
Owner

Looks okay, but under what circumstances do you not know whether setImage has been called?

@laurencedawson
Copy link
Contributor Author

I'm displaying a series of posts in a ViewPager, some images and some text.

As a user scrolls through the pager, they can trigger cursor updates which then invalidates each Fragment in the pager. When this update comes in I want to quickly check if the Fragment has already requested an image or has previously set the image. I handle the image management myself but it seems redundant to store a flag in the fragment to say it's set the image when the information is available in the view itself.

@davemorrissey
Copy link
Owner

Yeah that makes sense. I'm finishing off a change to zoom behaviour (#148) and will merge this when I'm done - but I'll rename it hasImage.

@davemorrissey davemorrissey merged commit 4fedb14 into davemorrissey:master Nov 5, 2016
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

Successfully merging this pull request may close these issues.

2 participants