-
Notifications
You must be signed in to change notification settings - Fork 320
Provide default LocationComponent style when not found #1696
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1696 +/- ##
===========================================
- Coverage 29.22% 29.2% -0.02%
Complexity 810 810
===========================================
Files 202 202
Lines 7898 7902 +4
Branches 618 619 +1
===========================================
Hits 2308 2308
- Misses 5369 5373 +4
Partials 221 221 |
Guardiola31337
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of minor comments. As soon as the conflicts from master are fixed we can merge here.
Thanks for the quick fix @danesfeder
| private static final String TRAFFIC_LAYER_ID = "traffic"; | ||
| private static final int[] ZERO_MAP_PADDING = {0, 0, 0, 0}; | ||
| private static final double NAVIGATION_MAXIMUM_MAP_ZOOM = 18d; | ||
| private static final int INVLAID_LAYER_STYLE = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo *INVLAID_LAYER_STYLE 👉 INVALID
| private int findLayerStyleRes(Context context) { | ||
| int locationLayerStyleRes = ThemeSwitcher.retrieveNavigationViewStyle(context, | ||
| R.attr.navigationViewLocationLayerStyle); | ||
| if (locationLayerStyleRes == INVLAID_LAYER_STYLE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rely on this https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/content/res/ResourceId.java#38 instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous comment #1696 (comment) won't apply if we implement this.
f07f10d to
353ecb3
Compare
353ecb3 to
5591a8a
Compare
Guardiola31337
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the feedback @danesfeder
![]()
5591a8a to
d8384bf
Compare
Closes #1692
We were assuming a style was being provided for the
LocationComponentwhen it's possible for developers to use theNavigationMapboxMapoutside of theNavigationViewcontext.