Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

MapboxManeuverView width is fixed in landscape mode

Open
#174 0 comments 0 reactions 0 assignees View on GitHub

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:
lndscape

Portraite :
portrait

Dominant language
Kotlin
Stars
65
Forks
56
Avg merge
1d 4h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-navigation-android-examples

All issues in mapbox/mapbox-navigation-android-examples

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.