Câu hỏi được gắn thẻ «android-selector»

5
Nút tùy chỉnh Android; thay đổi màu văn bản
Tôi đã tạo một nút thay đổi nền có thể vẽ trên các trạng thái khác nhau, theo cách này: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/btn_location_pressed" /> <!-- pressed --> <item android:state_focused="true" android:drawable="@drawable/btn_location_pressed"/> <!-- focused --> <item android:drawable="@drawable/btn_location"/> <!-- default --> Vấn đề ở đây là tôi cũng đang cố gắng …

9
Bộ chọn và màu văn bản Android
Tôi muốn có một đơn giản TextViewđể xử đường simple_list_item_1trong một ListViewkhông. Đây là XML: <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center" android:focusable="true" android:minHeight="?android:attr/listPreferredItemHeight" android:textAppearance="?android:attr/textAppearanceLarge" android:background="@android:drawable/list_selector_background" /> Mọi thứ hoạt động ngoại trừ màu văn bản (dự kiến) không thay đổi ở trạng thái tập trung. Làm thế nào để tôi thay …
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookie và Chính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.