Bạn có thể tạo thiết kế spinner hoàn toàn tùy chỉnh như
Bước 1: Trong thư mục drawable, tạo tệp nền cho đường viền của công cụ quay vòng.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent" />
<corners android:radius="5dp" />
<stroke
android:width="1dp"
android:color="@android:color/darker_gray" />
</shape>
Bước2: để thiết kế bố cục của spinner, hãy sử dụng biểu tượng thả xuống này hoặc bất kỳ hình ảnh drop.png nào

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="3dp"
android:layout_weight=".28"
android:background="@drawable/spinner_border"
android:orientation="horizontal">
<Spinner
android:id="@+id/spinner2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:background="@android:color/transparent"
android:gravity="center"
android:layout_marginLeft="5dp"
android:spinnerMode="dropdown" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:src="@mipmap/drop" />
</RelativeLayout>
Cuối cùng trông giống như hình ảnh bên dưới và nó có thể nhấp ở mọi nơi trong khu vực tròn và không cần phải viết nhấp vào Lister cho imageView.

Bước 3: Đối với thiết kế thả xuống, xóa dòng khỏi Danh sách thả xuống và thay đổi màu nền, Tạo bộ điều hợp tùy chỉnh như
Spinner spinner = (Spinner) findViewById(R.id.spinner1);
String[] years = {"1996","1997","1998","1998"};
ArrayAdapter<CharSequence> langAdapter = new ArrayAdapter<CharSequence>(getActivity(), R.layout.spinner_text, years );
langAdapter.setDropDownViewResource(R.layout.simple_spinner_dropdown);
mSpinner5.setAdapter(langAdapter);
Trong thư mục bố trí, hãy tạo R.layout.spinner văn bản
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layoutDirection="ltr"
android:id="@android:id/text1"
style="@style/spinnerItemStyle"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:paddingLeft="2dp"
/>
Trong thư mục bố trí, tạo Simple_spinner_dropdown.xml
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="@style/spinnerDropDownItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:singleLine="true" />
Trong các kiểu, bạn có thể thêm kích thước và chiều cao tùy chỉnh theo yêu cầu của bạn.
<style name="spinnerItemStyle" parent="android:Widget.TextView.SpinnerItem">
</style>
<style name="spinnerDropDownItemStyle" parent="android:TextAppearance.Widget.TextView.SpinnerItem">
</style>
Cuối cùng trông giống như

Theo yêu cầu, bạn có thể thay đổi màu nền và văn bản của màu thả xuống bằng cách thay đổi màu nền hoặc màu văn bản của Simple_spinner_dropdown.xml