Visitar URL original
[android] dont use replace transaction anymore. by farfromrefug · Pull Request #8750 · NativeScript/NativeScript · GitHub
The Wayback Machine - https://web.archive.org/web/20260625023258/https://github.com/NativeScript/NativeScript/pull/8750
Skip to content

[android] dont use replace transaction anymore.#8750

Merged
NathanWalker merged 1 commit into
NativeScript:feat/monorepofrom
Akylas:feat/monorepo_fix_fragment_transitions
Aug 7, 2020
Merged

[android] dont use replace transaction anymore.#8750
NathanWalker merged 1 commit into
NativeScript:feat/monorepofrom
Akylas:feat/monorepo_fix_fragment_transitions

Conversation

@farfromrefug

Copy link
Copy Markdown
Collaborator

So this is a long coming fix for me in all my apps.
Kind of in the same vibe as #8561

Until now when transitioning between fragment we were using replace which means that moving to a new fragment the current fragment was destroyed and re created on back.
This was bad for maps and any opengl rendered views.
Here is an example of what it looked like before
file1

This PR changes that behavior by using add and remove.
I hacked the transition life handlers a bit the get the entry we are moving to and the entry we are moving from.
Another plus of this is that back navigations should be faster as we dont recreate the views.
We will also keep the positions in any scroll view!!!

Here is what it looks like now:

file

That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
@cla-bot cla-bot Bot added the cla: yes label Aug 7, 2020
@NathanWalker NathanWalker merged commit 153fa14 into NativeScript:feat/monorepo Aug 7, 2020
@farfromrefug

Copy link
Copy Markdown
Collaborator Author

Thanks would be good to test it a bit. The ui app did not that many tests for navigation. And the navigation app was not building here

NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 8, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 8, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 8, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 8, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 8, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 8, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 12, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 12, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
NathanWalker pushed a commit that referenced this pull request Aug 12, 2020
That way we dont “unload” and “load” fragments.
This fixes black screens and slow transitions with opengl or cameras
@NathanaelA

This comment was marked as abuse.

@farfromrefug

Copy link
Copy Markdown
Collaborator Author

@NathanaelA OK thanks for looking into this. Will fix this and open a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants