Skip to content
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

[Bug]: Why is currentDestination momentarily returned as null ? #1675

Open
3 tasks done
mahmed1987 opened this issue Oct 31, 2024 · 0 comments
Open
3 tasks done

[Bug]: Why is currentDestination momentarily returned as null ? #1675

mahmed1987 opened this issue Oct 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mahmed1987
Copy link

mahmed1987 commented Oct 31, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

What happened?

When switching between the top level destinations , why is the current destination null first , and later gets its actual value ? This causes a flicker when moving from screen to screen since when the destination is null the top bar is taken out of the composition tree , and later bought back in

Just navigate to this location in NIA
com/google/samples/apps/nowinandroid/ui/NiaApp.kt:203
and add a Log statement under destination property
Log.d("Current Destination ","${destination}")

I have pasted the LogCat result too .

Also attached is a video in which the flicker can be clearly observed .

This is a huge issue and I am pretty sure this didn't exist when using navigation via string routes.

Please advise .

image

Now.in.Android.screen.recording.mp4
Oct 26 2024 002036 Gulf

Relevant logcat output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mahmed1987 mahmed1987 added the bug Something isn't working label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant