mapbox / mapbox/mapbox-navigation-android-examples

Override style of MapboxTripProgressView

オープン
#171 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Kotlin
スター
65
フォーク
56
平均マージ
1日 4時間
マージ済み PR(30日)
2

説明

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!

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

mapbox_activity_trip_progress.xml から始め、スタイル設定を mapbox_activity_show_maneuver_instructions.xml と比較します。MapboxTripProgressView が updateStyle とコンストラクターの style 値をどのように使用しているかを、MapboxManeuverView の updateOptions と比較しながら追跡します。完了条件は、trip progress の例にあるカスタムスタイルが期待どおりに適用されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
kotlin
領域
mobile-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。