Google's documentation says:
By default, the fragment has no border or background. To provide a
consistent visual appearance, nest the fragment within another layout
element such as a CardView.
So e.g. to give it a quantum_orange look I did this:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_gravity="center"
card_view:cardBackgroundColor="@color/quantum_orange"
card_view:cardCornerRadius="4dp">
<fragment
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.cardview.widget.CardView>
</LinearLayout>
Otherwise you can just do this:
autocompleteFragment.getView().setBackgroundResource(R.drawable.my_drawable);
or this:
autocompleteFragment.getView().setBackgroundColor(Color.RED);
Alternatively you may want to look into creating your own fully customizable UI using a custom fragment.
Hope this helps you.