mapbox / mapbox/mapbox-navigation-android-examples

Override style of MapboxTripProgressView

Đang mở
#171 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Kotlin
Star
65
Fork
56
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
2

Mô tả

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!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với mapbox_activity_trip_progress.xml và so sánh thiết lập kiểu dáng của tệp này với mapbox_activity_show_maneuver_instructions.xml. Theo dõi cách MapboxTripProgressView sử dụng updateStyle và giá trị style trong hàm khởi tạo của nó so với updateOptions của MapboxManeuverView; được xem là hoàn tất khi kiểu tùy chỉnh trong ví dụ tiến trình chuyến đi có hiệu lực như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
kotlin
Lĩnh vực
mobile-dev
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.