fix(tabview): prevent white flash on tab changes#1569
fix(tabview): prevent white flash on tab changes#1569NathanWalker wants to merge 1 commit intoNativeScript:masterfrom
Conversation
|
@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 perhaps that was incorrect PR link above? Only refers to tab limit adjustment. Is there another PR which addressed the white flash? |
|
@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. |
|
Oh excellent good to know thanks for this explanation! |
|
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? |
|
@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? |
|
I've opened the issue here. Fingers crossed I'm just doing something wrong! |
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)