You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't have time to do a proper change, test, and pull request so I'm just going to write this issue. If no one fixes, I'll come back to make the change and pull request after my app release.
Problem: those modifications have the side effect that if I change transformations after a vertical or horizontal flip, when I swipe the other direction, the off screen view, which is now on screen, remains hidden.
I believe the framework already (sort of) supported the necessary change to remedy this. For anyone that runs into the problem, make the following change to ABaseTransformer: if (hideOffscreenPages() && (position <= -1f || position >= 1f)) { page.setVisibility(View.INVISIBLE); page.setAlpha(0f); // page.setEnabled(false); } else { // page.setEnabled(true); page.setAlpha(1f); page.setVisibility(View.VISIBLE); }
And then you can remove the onPostTransform from FlipHorizontal and FlipVertical.
In doing other work I did a limited amount of research on alpha vs visibility. I found a post from Romain Guy saying to use visibility and not alpha to hide/show as it's more efficient. The original defects were due to the framework using alpha to hide. The partial fixes switched to using visibility to prevent interaction with "off screen" pages, as it should be IMO. Problem is the side effect I found. Moving this into the framework itself fixes both these transformations and future transformations.
I left the alpha change in as it's necessary to clean up after some transformations. I don't think the setEnabled is necessary and it's commented out in my copy.
To the original developer that fixed the Flip transformation, thank you! I'd been having a problem being unable to scroll after a transformation and not taking the time to debug. Your fix helped very much.
The text was updated successfully, but these errors were encountered:
Don't have time to do a proper change, test, and pull request so I'm just going to write this issue. If no one fixes, I'll come back to make the change and pull request after my app release.
Problem: those modifications have the side effect that if I change transformations after a vertical or horizontal flip, when I swipe the other direction, the off screen view, which is now on screen, remains hidden.
I believe the framework already (sort of) supported the necessary change to remedy this. For anyone that runs into the problem, make the following change to ABaseTransformer:
if (hideOffscreenPages() && (position <= -1f || position >= 1f)) { page.setVisibility(View.INVISIBLE); page.setAlpha(0f); // page.setEnabled(false); } else { // page.setEnabled(true); page.setAlpha(1f); page.setVisibility(View.VISIBLE); }
And then you can remove the onPostTransform from FlipHorizontal and FlipVertical.
In doing other work I did a limited amount of research on alpha vs visibility. I found a post from Romain Guy saying to use visibility and not alpha to hide/show as it's more efficient. The original defects were due to the framework using alpha to hide. The partial fixes switched to using visibility to prevent interaction with "off screen" pages, as it should be IMO. Problem is the side effect I found. Moving this into the framework itself fixes both these transformations and future transformations.
I left the alpha change in as it's necessary to clean up after some transformations. I don't think the setEnabled is necessary and it's commented out in my copy.
To the original developer that fixed the Flip transformation, thank you! I'd been having a problem being unable to scroll after a transformation and not taking the time to debug. Your fix helped very much.
The text was updated successfully, but these errors were encountered: