Tôi chỉ tự hỏi liệu có thể đơn giản là xóa mũi tên thả xuống cho một spinner không? Tôi có một mũi tên có thể kéo được trong bố cục backgroud cho spinner của tôi, tuy nhiên mũi tên mặc định của hệ thống xuất hiện ở bên phải của spinner, mà tôi muốn loại bỏ.Android - Xóa mũi tên thả xuống Spinner
Đây là mã xml spinner cho bố trí hoạt động của tôi
<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"/>
Và bố trí spinner tùy chỉnh của tôi trông như thế này:
<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" />
Cảm ơn!
Kiểm tra liên kết này nó có thể giúp bạn http://stackoverflow.com/questions/4058360/how-to-create-android-spinner-without-down-triangle-on-the-right-side- của-the-wid –
Không chắc chắn lý do tại sao các downvotes, tôi đã được tìm kiếm về cách làm điều này trong một vài giờ ngay bây giờ trước khi yêu cầu. – Metalor
Chỉ cần nhìn thấy bình luận của bạn @ ZubairAkber, cảm ơn đống! Không chắc chắn làm thế nào tôi bỏ lỡ, tôi thường là một chuyên gia tại Googling. Cảm ơn một lần nữa :) – Metalor