Skip to content

PlaceAutocomplete does not set toolbarColor #954

@Firzen7

Description

@Firzen7

Hi, I am using your PlaceAutocomplete activity, but when I set toolbarColor using PlaceOptions.builder(), it doesn't do anything, and toolbar remains black.

It doesn't work in emulator either, no matter the Android version apparently. It doesn't even work in MapBox Demo appliaction on GooglePlay (https://play.google.com/store/apps/details?id=com.mapbox.mapboxandroiddemo&hl=en) - once I open the places autocomplete activity, toolbar turns black.

I have looked at the source of MapBox Demo app, and I am using very similar code:

Intent intent = new PlaceAutocomplete.IntentBuilder()
.accessToken(FrontendConstants.MAPBOX_API_TOKEN)
.placeOptions(PlaceOptions.builder()
.backgroundColor(Color.parseColor("#144259"))
.toolbarColor(getResources().getColor(R.color.colorStatusBar))
.limit(10)
.proximity(Point.fromLngLat(loc.getLongitude(), loc.getLatitude()))
.build(PlaceOptions.MODE_CARDS))
.build(this);
startActivityForResult(intent, FrontendConstants.PLACES_REQUEST_CODE);

I am sure it will be easy to fix for you. It sadly seems impossible to override this behaviour for me. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions