Android - Entfernen Sie Den Spinner-Pfeil

Ich Frage mich nur, ob es überhaupt möglich ist, entfernen Sie einfach die dropdown-Pfeil für ein spinner? Ich habe ein drawable Pfeil in ein hintergrund-layout für meine spinner, aber die Standard-system-Pfeil erscheint auf der rechten spinner, die würde ich gerne loswerden.

Hier ist der spinner xml-code für meine Tätigkeit layout

<Spinner
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/spinnerSelectStaff"
            android:layout_gravity="center_horizontal"
            android:layout_marginLeft="18dp"
            android:layout_marginRight="18dp"
            android:gravity="center"
            android:dropDownSelector="@drawable/empty"/>

Und meine custom-spinner-layout sieht wie folgt aus:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@android:id/text1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_margin="5dp"
          android:gravity="center"
          android:textSize="20sp"
          android:background="@drawable/spinner_text_shape"
          android:drawableRight="@drawable/ic_keyboard_arrow_down_black_24dp"
          android:textColor="@color/primary_text" />

Dank!

InformationsquelleAutor der Frage Metalor | 2015-06-02

Schreibe einen Kommentar