mapbox / mapbox/mapbox-navigation-android-examples

Override style of MapboxTripProgressView

Offen
#171 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Kotlin
Sterne
65
Forks
56
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
2

Beschreibung

Hi,

I'm following the "Render trip progress information" example and I'm wanting to apply a custom style to the MapboxTripProgressView component.

I can see in mapbox_activity_trip_progress.xml there is already a custom style applied but commented out. I've tried uncommenting this but the style doesn't seem to take effect.

Conversely I've tried uncommenting the custom style in "Render maneuver instructions for a route" (mapbox_activity_show_maneuver_instructions.xml) and this works fine.

I think the difference in behaviour is because MapboxManeuverView is passing config through the "updateOptions" functions, whereas MapboxTripProgressView is using the "updateStyle" function (which appears to be deprecated, and also has a hardcoded style of 0 passed in through the constructor that's being used).

Let me know if you need any more info.

Thanks!

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit mapbox_activity_trip_progress.xml und vergleiche die Einrichtung des Stylings mit mapbox_activity_show_maneuver_instructions.xml. Verfolge, wie MapboxTripProgressView updateStyle und den style-Wert seines Konstruktors verwendet, im Vergleich zu updateOptions von MapboxManeuverView; abgeschlossen ist die Aufgabe, wenn der benutzerdefinierte Style im Beispiel für den Trip-Fortschritt wie erwartet wirksam wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
kotlin
Bereich
mobile-dev
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.