Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5020
Clipped Flow View (via corrupted offset) Under Specific Device Rotation Conditions
posted

I'm seeing an issue when a flow view is scrollable and then the device rotates.  It only happens when certain conditions are met.  Here's how to reproduce:

1) Create a flow layout that fits on the entire screen in portrait orientation.

2) When rotated to landscape, the flow layout should exist such that it is higher than the screen's height.  The flow will be scrollable.

3) Scroll to the bottom.

4) Rotate back to portrait orientation.

If you get it to fail, you will notice that the cells resized appropriately, and everything should fit on the screen (it doesn't scroll), yet the content offset is maintained so that the top cells get clipped.  To fix, the user has to rotate to landscape, scroll up, and then rotate back to portrait.

I'm also seeing a similar issue when I'm resizing nested flow layouts.  It seems that the flow view does not reset it's offset when the content fits inside the view.  Thoughts?

Parents
  • 40030
    Offline posted

    Hi Caylan, 

    Just so that I know i'm reproducing the same issue. When you rotate, are you changing the number of horizontal blocks and the number of vertical blocks? Otherwise, regardless of your orientation, the flowLayout would be scaled to fit. That means if you were scrollable as vertical, then you're scrollable as horizontal, vice versa. 

    If that is indeed the case, then i did find a bug there. Basically, we adjust the contentOffset of the flowLayout, based on the new bounds. So that you're essentially in the same scrolling position. We need to add additional logic there, to avoid that if you're changing the layout. 

    -SteveZ

Reply Children