I am using Exposed dropdown menu as a spinner and would like to modify aspects of the icon. As it is a small spinner, the arrow icon is very centered and I would like to move it to the right. I would also like to change its background, currently it is like "selectableItemBackgroundBorderless" and I would like to set it to null.
This is my code:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/myTeamFormationSpinner"
style="@style/CustomExposedDropMenu"
android:layout_width="80sp"
android:layout_height="30sp"
android:layout_below="@id/myTeamTableData"
android:layout_alignParentEnd="true">
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="none" />
</com.google.android.material.textfield.TextInputLayout>
<style name="CustomExposedDropMenu" parent="Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu">
<item name="boxBackgroundColor">@color/black</item>
<item name="counterTextColor">@color/grayish_white</item>
<item name="boxStrokeColor">@null</item>
<item name="endIconTint">@color/grayish_white</item>
<item name="boxCornerRadiusTopStart">7sp</item>
<item name="boxCornerRadiusBottomStart">7sp</item>
<item name="boxCornerRadiusTopEnd">7sp</item>
<item name="boxCornerRadiusBottomEnd">7sp</item>
<item name="boxStrokeWidth">0sp</item>
<item name="boxStrokeWidthFocused">0sp</item>
</style>
Source: Android Questions
