Mapbox-navigation-android: Allow navigation list text color to be styleable

Created on 8 Jan 2020  路  2Comments  路  Source: mapbox/mapbox-navigation-android

As per https://docs.mapbox.com/android/navigation/overview/map-styling/, I can style some components of the Navigation UI.

We are interested in styling the upcoming navigation steps screen. I'm using navigationViewListBackground to set a different color for the list background and that works fine.

As for some configurations we want to set it to white, the text is not readable anymore, as it seems to be always white.

Could you please make it styleable/configurable too, just like navigationViewListBackground? That would be great!

Android API: 28
Mapbox Navigation SDK version: 0.41.0

Expected behavior

Test color can be set

Actual behavior

Text color can not be set

Bildschirmfoto 2020-01-07 um 15 21 55
current

Most helpful comment

Thanks, that鈥檚 awesome! Told my team about it and the are excited as well. Will still take some months until we get to implement this though, I鈥檓 afraid :).

All 2 comments

This will be possible when 1.0 is released 馃帀 馃憖 https://github.com/mapbox/mapbox-navigation-android/pull/2660/files#r402613859

<style name="InstructionView">
    <item name="instructionViewPrimaryBackgroundColor">?attr/navigationViewBannerBackground
    </item>
    <item name="instructionViewSecondaryBackgroundColor">?attr/navigationViewSecondary</item>
    <item name="instructionListViewBackgroundColor">?attr/navigationViewListBackground</item>
    <item name="instructionViewPrimaryTextColor">?attr/navigationViewBannerPrimaryText</item>
    <item name="instructionViewSecondaryTextColor">?attr/navigationViewBannerSecondaryText
    </item>
    <item name="instructionManeuverViewPrimaryColor">?attr/navigationViewBannerManeuverPrimary
    </item>
    <item name="instructionManeuverViewSecondaryColor">
        ?attr/navigationViewBannerManeuverSecondary
    </item>
</style>

Closing here.

cc @JunDai

Thanks, that鈥檚 awesome! Told my team about it and the are excited as well. Will still take some months until we get to implement this though, I鈥檓 afraid :).

Was this page helpful?
0 / 5 - 0 ratings