Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(tabview): prevent white flash on tab changes #1569

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

Conversation

NathanWalker
Copy link
Contributor

@NathanWalker NathanWalker commented Oct 25, 2018

PR Checklist

What is the current behavior?

White flash occurs on iOS and Android when tabview's change.

What is the new behavior?

White flash will no longer occur when switching tabs on Android.
iOS requires few more changes - see comment here. Since the changes to complete for iOS are debateable I will let the debate continue on that suggestion until we reach conclusion before submitting further PR's to complete for iOS which needs changes in core modules as well.

closes NativeScript/NativeScript#6454

Also addresses #1351 (comment)

@MartoYankov
Copy link
Contributor

@NathanWalker This problem was fixed in the core modules repo with this PR - NativeScript/NativeScript#6476 . It's available with the 5.0 release.

@MartoYankov MartoYankov closed this Feb 4, 2019
@ghost ghost removed the ♥ community PR label Feb 4, 2019
@NathanWalker
Copy link
Contributor Author

@MartoYankov perhaps that was incorrect PR link above? Only refers to tab limit adjustment. Is there another PR which addressed the white flash?

@MartoYankov
Copy link
Contributor

@NathanWalker Yep, that was causing the white flash and numerous other ux problems. The Android PagerAdapter can't be set to not pre-load adjacent tab fragments. We tried to trick it into thinking it pre-loaded them, but we loaded them on tab change. Unfortunately, this didn't work quite well with the fragments transitions, thus the white flash. It even broke the nesting scenario and some cases where you resume the app after suspend. It generated a lot of crashes that were hard to track (PNP app) and we decided to remove the hack.

We are now working on a complete TabView re-design to clear the problems with pre-loading, ux, styling and more.

@NathanWalker
Copy link
Contributor Author

Oh excellent good to know thanks for this explanation!

@brandon-sigao
Copy link

Would this issue be related to screen flashing when navigating between child routes? I have a main feature component (lazy loaded) with a page-router-outlet + several children pages and I can not seem to get the flashing to stop (especially noticeable because we have pages set to a dark background). This issue becomes way worse when using page transition animations. If we use the animations the page navigates forwards perfectly, but when pressing the back button it flashes twice on every transition and eventually breaks the transitions all together.

I've updated to nativescript-angular@latest (which is 7.2.1 right now) and the issue still persists. I'd really love to find a fix for this because not having a static header with multiple children is really going to impact our app design. As far as I can tell having multiple page-router-outlets and children pages is a supported pattern, no?

@MartoYankov
Copy link
Contributor

@brandon-sigao The scenario you are talking about should be supported and sounds like a different bug. Can you open a new issue and provide some code samples or a project that we can use to reproduce it?

@brandon-sigao
Copy link

I've opened the issue here. Fingers crossed I'm just doing something wrong!

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.

Tabview flashing transition
3 participants