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

Is there a way to extends Visibility detector viewport/bound box? #542

Open
WOOVYWOOVY opened this issue Sep 24, 2024 · 2 comments
Open

Comments

@WOOVYWOOVY
Copy link

Problem description

This is a question regarding visibility detector.

Steps to reproduce

  1. A simple list view with each item has it's own visibility detector attached to it.

Expected behavior

I expected for the widgets from the simple list even when not fully visible (visibleFraction: 0.0), could be treated as a partially visible one (visibleFraction: 0.01~), by extending the viewport/bound box/the visible area within the same scroll position.

Actual behavior

If there's just a slight scroll between the edge of the viewport, the widget disappearance could be seen by the user, and I would like to prevent that.

Environment

I am using an android emulator.

Additional details

--

Any feedback is appreciated, thank you!

@jamesderlin
Copy link
Collaborator

jamesderlin commented Sep 25, 2024

I don't understand what you're asking for. You want the VisibilityDetector to report items as very slightly partially visible when they aren't actually visible at all?

Can you please describe a concrete example for what you want and why it would be useful?

@WOOVYWOOVY
Copy link
Author

WOOVYWOOVY commented Sep 25, 2024

Thanks for the reply james! In my current app structure, it is quite hard to implement the classic shrinkwrap: false listview that would recycle widgets when they aren't visible which would improve the performance, so I am using a different approach where I'm thinking I'll be using visibility detector instead and the Visibility class to make the widgets disappear, to, at least, saves the performance.

But sadly I don't really understand how to extent the viewport so that user don't have to see a 'gap' which is a disappeared widget for a sec, and then finally the widget appeared filling the gap after that short moment.

It would be really useful and improve user experience if user doesn't have to see a gap when they're scrolling fast and having the 'invisible' widgets in the UI even just for a split second.

But maybe, you have another suggestion instead of this approach? Since I have a long list with just simple images, and everytime the list loads it rendered all the images in the list all at once, that hurts the performance... Thank you James!

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

2 participants