mapbox / mapbox/mapbox-navigation-android-examples
Override style of MapboxTripProgressView
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Kotlin
- Estrellas
- 65
- Forks
- 56
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 2
Descripción
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!
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con mapbox_activity_trip_progress.xml y compara su configuración de estilos con la de mapbox_activity_show_maneuver_instructions.xml. Rastrea cómo MapboxTripProgressView utiliza updateStyle y el valor de style de su constructor frente a updateOptions de MapboxManeuverView; se considera terminado cuando el estilo personalizado del ejemplo de progreso del trayecto surta efecto como se espera.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- kotlin
- Área
- mobile-dev
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100