< com.google.android.material.textfield.TextInputLayout style ="@style/Widget.Material3.TextInputLayout.OutlinedBox.ExposedDropdownMenu" android :layout_width ="match_parent" android :layout_height ="wrap_content" > < AutoCompleteTextView android :id ="@+id/autoCompleteTv" android :layout_width ="match_parent" android :layout_height ="wrap_content" android :inputType ="none" /> object AutoCompleteHelper { fun < T > initializeAutoCompleteTextView ( context : Context , autoCompleteTextView : AutoCompleteTextView , data : List < T >, displayFunction : ( T ) -> String , onItemSelectedListener : ( position : Int , selectedItem : T ) -> Unit ) { val adapter = ArrayAdapter( context , android. R . layout . simple_spinner_dropdown_item , data . map ( displayFunction )) autoCompleteTextView .setAdapter( a...