Làm cách nào để sử dụng danh sách lớp làm đối tượng có thể kéo cho nút. Tôi có một nút: Android Sử dụng danh sách lớp cho công cụ chọn nút
<item android:state_pressed="true">
<shape>
<gradient android:endColor="@color/white"
android:startColor="@color/grey_blue_light" android:angle="90" />
<stroke android:width="1dp" android:color="@color/aqua_blue" />
<corners android:radius="3dp" />
<padding android:left="10dp" android:top="10dp"
android:right="10dp" android:bottom="10dp" />
</shape>
</item>
<item android:state_focused="true">
</item>
<item>
</item>
Bây giờ tôi cần một lớp-list được sử dụng như một hình dạng khi nói nút trạng thái được nhấn:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/aqua_blue" />
</shape>
</item>
<item android:top="1dp" android:left="1dp" android:right="1dp" android:bottom="1dp">
<shape android:shape="oval">
<solid android:color="@color/aqua_blue" />
</shape>
</item>
thế nào chúng ta có sử dụng danh sách lớp này trong bộ chọn nút không?
Câu trả lời hay. Nhưng vì bạn có một phần tử '' duy nhất dưới '' Tôi nghĩ rằng phần tử thứ hai có thể được bỏ qua. I E. ' '. Đã làm cho tôi. –
SoftDesigner