I think the best and up-to-date way of doing this is using TextInputLayout from Material Design and set the Style tag as ExposedDropdownMenu
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:hint="Hint Text"
android:orientation="horizontal">
<AutoCompleteTextView
android:id="@+id/actv_exposed_dropdown_list"
android:layout_width="match_parent"
android:layout_height="61dp"
android:inputType="none" />
</com.google.android.material.textfield.TextInputLayout>