How do I change the autocomplete fragment overlay to dark them?

Viewed 191

I'm trying to change the color of the overlay search box and the drop down with suggestion as well.

[AutoComplete] Fragment 1

XML

    <androidx.cardview.widget.CardView
        android:id="@+id/cardview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/autocomplete_fragment"
            android:name="com.google.android.libraries.places.widget.AutocompleteSupportFragment"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

        </androidx.fragment.app.FragmentContainerView>
    </androidx.cardview.widget.CardView>

    <FrameLayout
        android:id="@+id/MapView"
        android:layout_width="match_parent"
        android:layout_height="310dp">

        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/map"
            android:name="com.google.android.gms.maps.SupportMapFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            tools:context=".MapFragment" />
    </FrameLayout>

Activity

 // Initialize the AutocompleteSupportFragment.
        AutocompleteSupportFragment autocompleteFragment = (AutocompleteSupportFragment)
                getSupportFragmentManager().findFragmentById(R.id.autocomplete_fragment);

 // Specify the types of place data to return.
 autocompleteFragment.setPlaceFields(Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG));
0 Answers
Related