Skip to content

Commit a72f9ce

Browse files
committed
update edge insets for camera viewport
1 parent a2bf593 commit a72f9ce

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

libnavui-dropin/src/main/java/com/mapbox/navigation/dropin/camera/CameraLayoutObserver.kt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ internal class CameraLayoutObserver(
5353
is NavigationState.DestinationPreview,
5454
is NavigationState.FreeDrive,
5555
is NavigationState.RoutePreview -> {
56-
EdgeInsets(vPadding, hPadding, vPadding + bottom, hPadding)
56+
EdgeInsets(vPadding, hPadding, bottom, hPadding)
5757
}
5858
is NavigationState.ActiveNavigation,
5959
is NavigationState.Arrival -> {
60-
EdgeInsets(vPadding + top, hPadding, vPadding + bottom, hPadding)
60+
EdgeInsets(vPadding + top, hPadding, bottom, hPadding)
6161
}
6262
}
6363
}
@@ -68,12 +68,7 @@ internal class CameraLayoutObserver(
6868
val bottom = mapView.height.toDouble() - binding.roadNameLayout.top.toDouble()
6969
return when (store.state.value.navigation) {
7070
is NavigationState.FreeDrive -> {
71-
EdgeInsets(
72-
vPaddingLandscape,
73-
hPaddingLandscape,
74-
vPaddingLandscape + bottom,
75-
hPaddingLandscape
76-
)
71+
EdgeInsets(vPaddingLandscape, hPaddingLandscape, bottom, hPaddingLandscape)
7772
}
7873
is NavigationState.DestinationPreview,
7974
is NavigationState.RoutePreview,
@@ -82,8 +77,8 @@ internal class CameraLayoutObserver(
8277
EdgeInsets(
8378
vPaddingLandscape,
8479
hPaddingLandscape + left,
85-
vPaddingLandscape + bottom,
86-
hPaddingLandscape + right
80+
bottom,
81+
right - hPaddingLandscape
8782
)
8883
}
8984
}

libnavui-dropin/src/main/res/values/dimens.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
<!-- Overview camera padding to ensure location puck and target pin are not clipped -->
2828
<dimen name="mapbox_camera_overview_padding_v">50dp</dimen>
29-
<dimen name="mapbox_camera_overview_padding_landscape_v">30dp</dimen>
29+
<dimen name="mapbox_camera_overview_padding_landscape_v">35dp</dimen>
3030
<dimen name="mapbox_camera_overview_padding_h">50dp</dimen>
31-
<dimen name="mapbox_camera_overview_padding_landscape_h">30dp</dimen>
31+
<dimen name="mapbox_camera_overview_padding_landscape_h">35dp</dimen>
3232

3333
<dimen name="mapbox_extendable_button_width">72dp</dimen>
3434
<dimen name="mapbox_extendable_button_height">52dp</dimen>

0 commit comments

Comments
 (0)