GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(android): keep the root view when an activity replaces another by herefishyfish · Pull Request #11624 · NativeScript/NativeScript Conversation
|
| Steps | Without this PR | With this PR |
|---|---|---|
| Back with an immediate reopen | Blank in 5 of 5 | Page shown in 10 of 10 |
Second activity with -f 0x08000000 |
Blank in 5 of 5 | Page shown |
| Back from the second activity to the first | Blank | Page shown |
| Second activity, night mode change, Back | Not run | Page shown |
| Back, wait 5 seconds, reopen | Page shown in 3 of 3 | Page shown |
| Clear-task launch | Not run | Page shown |
The stock toolbox app shows its page on all of these paths with this PR.
An app with no main entry still shows the blank screens and the back press crash listed above. I reproduced the crash on main without this PR.
Unit tests: 650 passed, 1 failed, 1 skipped. The failure is the CSS spec above. Five of the eight new specs fail without the fix.
Not tested: real Angular, Vue, or Solid apps, a physical device, iOS, and TabView roots. The new specs use fake views, so they check the order of calls and not real fragment behavior. There is no apps/automated test.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
View your CI Pipeline Execution ↗ for commit 129b25a
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
commit: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Add specs for an activity that no longer shows the root view and for the activity that shows it. Five specs fail without the next commit. The other three pin behavior that must not change.
Android can start a new activity before the old one stops. When both activities use one root view, the old activity unloaded and destroyed the view that the new activity showed. The view also kept the old FragmentManager, so the screen stayed blank. onStop, onDestroy, and onSaveInstanceState now act only on a root view that the activity shows. A new activity unloads the view from the previous activity before it adopts the view, which clears the cached FragmentManager. An activity takes the view back when it starts again. Fixes NativeScript#11615
0d451fc to
129b25a
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Android] Blank screen when a new activity adopts a shared root view before the old one stops
There was an error while loading. Please reload this page.