mapbox / mapbox/mapbox-navigation-android-examples
Override style of MapboxTripProgressView
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- 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