Fixed
Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
Activity destinations should be considered exit points for your navigation graph - they are not part of the NavController's back stack and therefore not being sent to OnNavigatedListeners is working as intended.
lb...@gmail.com <lb...@gmail.com> #3
Thank you for your explanation, but although that is the intended behavior, it is still confusing.
In my opinion, the developer expects to be notified when any navigation action defined in the graph is performed, regardless the destination.
Although that action is considered an exit point, it is an action defined within the graph and it is indeed a navigation action happening in that graph, so I don't understand why it is not notified to the "OnNavigated" listener when it has indeed navigated, regardless if it affects or not the back stack.
I that is the intended behaviour, then it should be rather called something like "NavController.OnBackStackChangedListener".
In my opinion, the developer expects to be notified when any navigation action defined in the graph is performed, regardless the destination.
Although that action is considered an exit point, it is an action defined within the graph and it is indeed a navigation action happening in that graph, so I don't understand why it is not notified to the "OnNavigated" listener when it has indeed navigated, regardless if it affects or not the back stack.
I that is the intended behaviour, then it should be rather called something like "NavController.OnBackStackChangedListener".
rm...@google.com <rm...@google.com> #4
Yeah, naming is hard :)
Right now, NavController.OnNavigatedListener gives you a NavDestination that always equals navController.getCurrentDestination(). It doesn't give you what action you triggered, arguments, or anything else (including operations that don't change getCurrentDestination(), such as singleTop actions or activity destinations), so I could definitely see this more as a OnDestinationChangedListener.
I'll reopen this to track renaming the listener to something more appropriate to what it actually is doing or updating the documentation to make its role more clear.
Right now, NavController.OnNavigatedListener gives you a NavDestination that always equals navController.getCurrentDestination(). It doesn't give you what action you triggered, arguments, or anything else (including operations that don't change getCurrentDestination(), such as singleTop actions or activity destinations), so I could definitely see this more as a OnDestinationChangedListener.
I'll reopen this to track renaming the listener to something more appropriate to what it actually is doing or updating the documentation to make its role more clear.
Description
Emulator Version (Emulator--> Extended Controls--> Emulator Version):
20.1.10-5360736 Android 9
HAXM / KVM Version:
10.0.17134
Android SDK Tools:
26.1.1
Host Operating System:
Windows
CPU Manufacturer: [Intel / AMD / Other]
AMD
Steps to Reproduce Bug:
1. Open Android TV emulator
2. Notice it has some useless buttons that don't do anything such as rotating the screen. Try to press them.
Expected Behavior:
They shouldn't exist.
Observed Behavior:
They exist.
On one case, I somehow got the button of "fold horizontally", and when I clicked on it, it made the window hide itself completely. I had to force stop it from the emulators list window in order to open it again... For some reason I don't see the button anymore (was on the left of the window)