MapboxManeuverView width is fixed in landscape mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- android, kotlin
- Domain
- mobile-dev
Research direction
Start by comparing the portrait and landscape ConstraintLayout definitions shown in the issue, especially the MapboxManeuverView and content_box_frame_container constraints. Verify how the landscape layout determines the maneuver view width, then confirm that changing the container width also changes the maneuver view as expected in both orientations.
Written by the indexing model from the issue text.
Description
I'm not able to change MapboxManeuverView component width in landscape mode.
it works in portrait mode but not working on landscape mode.
Portrait layout :
`
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
android:id="@+id/mapboxView"
tools:context=".Screens.MapBoxScreen.MapBoxActivity">
<com.mapbox.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:mapbox_cameraTargetLat="40.7128"
app:mapbox_cameraTargetLng="-74.0060"
app:mapbox_logoEnabled="false"
app:mapbox_attributionEnabled="false"
app:mapbox_cameraZoom="14.0"/>
<include
android:id="@+id/where_to_sound_home"
layout="@layout/where_to_home_sound_item"
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlSymmetry" />
<com.mapbox.navigation.ui.maneuver.view.MapboxManeuverView
android:id="@+id/maneuverView"
android:layout_width="0dp"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_marginTop="23dp"
style="@style/MapboxCustomManeuverStyle"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="@id/content_box_frame_container"
app:layout_constraintEnd_toEndOf="@id/content_box_frame_container"
/>
<include
android:id="@+id/content_box_frame_container"
layout="@layout/mappo_player"
android:layout_width="436dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginBottom="12dp"
android:layout_marginTop="23dp"
app:layout_constraintTop_toBottomOf="@id/maneuverView"
app:layout_constraintStart_toStartOf="parent"
/>
<include
android:id="@+id/route_overview_container"
layout="@layout/route_overview_layout"
android:layout_width="493dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginBottom="12dp"
android:layout_marginTop="23dp"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<include
android:id="@+id/direction_component"
layout="@layout/direction_layout"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<include
android:id="@+id/map_controlss"
layout="@layout/map_controls"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="14dp"
android:layout_marginEnd="19dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlSymmetry" />
<!-- Framelayout to display Fragments -->
</androidx.constraintlayout.widget.ConstraintLayout>
`
Landscape code :
`
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
android:id="@+id/mapboxView"
tools:context=".Screens.MapBoxScreen.MapBoxActivity">
<com.mapbox.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:mapbox_cameraTargetLat="40.7128"
app:mapbox_cameraTargetLng="-74.0060"
app:mapbox_logoEnabled="false"
app:mapbox_attributionEnabled="false"
app:mapbox_cameraZoom="14.0"/>
<include
android:id="@+id/where_to_sound_home"
layout="@layout/where_to_home_sound_item"
android:layout_width="wrap_content"
android:layout_height="90dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlSymmetry" />
<include
android:id="@+id/direction_component"
layout="@layout/direction_layout"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<com.mapbox.navigation.ui.maneuver.view.MapboxManeuverView
android:id="@+id/maneuverView"
android:layout_width="0dp"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_margin="4dp"
style="@style/MapboxCustomManeuverStyle"
app:layout_constraintEnd_toEndOf="@id/content_box_frame_container"
app:layout_constraintStart_toStartOf="@id/content_box_frame_container"
app:layout_constraintBottom_toTopOf="@id/content_box_frame_container"
/>
<include
android:id="@+id/content_box_frame_container"
layout="@layout/mappo_player"
android:layout_width="436dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginBottom="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
<include
android:id="@+id/route_overview_container"
layout="@layout/route_overview_layout"
android:layout_width="493dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginBottom="12dp"
android:layout_marginTop="23dp"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
<include
android:id="@+id/map_controlss"
layout="@layout/map_controls"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlSymmetry" />
</androidx.constraintlayout.widget.ConstraintLayout>
`
Navigation SDK: "com.mapbox.navigation:android:2.9.4"
Screenshots :
Landscape:

Portraite :

- Dominant language
- Kotlin
- Stars
- 65
- Forks
- 56
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapbox/mapbox-navigation-android-examples
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
mapbox/mapbox-navigation-android-examples#207 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in mapbox/mapbox-navigation-android-examples
Similar issues
-
autoteam community team/use
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
android: AlbumArtistDetailViewModel keeps groupKeys of albums that disappeared in expandedAlbums Opentask
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
aaif-goose/goose#12496 ·
-
Schema rejections are neither logged nor attributed, so the offending object cannot be identified Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
zotero/zotero-android#350 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
guardianproject/orbot-android#1832 ·