[Android] Added the ability to hide the recenter button in the navigation view #483
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new configuration option to hide the recenter button in the navigation UI. Similar to the existing options for mute and zoom buttons, users can now control the visibility of the recenter button that appears in the bottom-left corner when the camera is not following the user's location.
Changes
showRecenter
boolean parameter toVisualNavigationViewConfig
(defaults totrue
for backward compatibility)useRecenterButton()
in line with existing button visibility controlsNavigatingInnerGridView
to check the new parameter before displaying the recenter buttonUsage
Developers can now control the recenter button visibility as part of their navigation configuration:
Testing
The changes maintain backward compatibility, with the recenter button visible by default. The feature can be tested by configuring a navigation view with
showRecenter = false
and verifying that the recenter button doesn't appear when the camera is not tracking the user's location.I am having trouble testing the changes due to issues with setting up cargo. So I need assistance with testing these changes.