2

does anyone kn ow how to change MaterialComponents Spinner widget arrow image With AutoCompleteTextView.

code:

 <com.google.android.material.textfield.TextInputLayout
     android:id="@+id/contractSpinnerContainer"
     style="@style/TextInputLayout.FilledBox.Dense.ExposeDropDownMenu"
     android:layout_width="0dp"
     android:layout_height="wrap_content"
     android:layout_marginTop="@dimen/default_padding"
     app:layout_constraintEnd_toStartOf="@+id/guidelineEnd"
     app:layout_constraintStart_toStartOf="@+id/guidelineStart"
     app:layout_constraintTop_toBottomOf="@+id/registrationLastNameContainer">

  <AutoCompleteTextView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:hint="Country"
         android:imeOptions="actionNext"
         android:includeFontPadding="false"
         android:inputType="textPersonName"
         android:maxLines="1"
         android:textColor="@color/ts_black"
         android:textSize="@dimen/login_input_text_size" />

 </com.google.android.material.textfield.TextInputLayout>

result that want to change:

enter image description here

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
Antonis Radz
  • 3,036
  • 1
  • 16
  • 34

2 Answers2

3

So with a help of @MatPag answer is:

app:endIconMode="custom"
app:endIconDrawable="@drawable/custom_icon"

and actually on API29 it is working without app:endIconMode="custom", haven't tested on other API's.

Antonis Radz
  • 3,036
  • 1
  • 16
  • 34
0

You need to set background using theme changes of parent.