Bạn có thể thay đổi các cài đặt này trong tệp bố cục. Hướng dẫn hello-spinner rất hữu ích.
http://developer.android.com/guide/tutorials/views/hello-spinner.html
Thêm tệp XML mới vào thư mục bố cục của bạn.
Ví dụ: spinnerLayout.xml
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/spinnerTarget"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="14pt"
android:textColor="#FF8B1500"
android:gravity="center"/>
Thay đổi nguồn adapter để bố trí tập tin mới của bạn:
adapter = ArrayAdapter.createFromResource(
this, R.array.sound, R.layout.spinnerLayout);
Vâng, nó đã thay đổi toàn bộ kích thước đối tượng giao diện người dùng, nhưng tôi muốn tùy chỉnh trình quay số. Có thể giống như sử dụng setDropDownResource, nhưng tôi không thể tìm ra cách tạo tài nguyên như vậy. – kaibuki
OK Tôi hiểu ý của bạn là gì. Tôi đã chỉnh sửa bài đăng trước đó. – sirlunchalot