Sử dụng danh sách lớp bên dưới, tỷ lệ có thể vẽ của tôi không bao giờ được hiển thị. Tại sao vậy?Danh sách lớp Android không hiển thị mục có thể chia tỷ lệ?
menu_dialog_header.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/black"></solid>
</shape>
</item>
<item>
<scale
android:scaleHeight="50%"
android:scaleWidth="100%"
android:scaleGravity="top"
android:drawable="@drawable/shine" />
</item>
</layer-list>
shine.xml
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/shine" />
</shape>
menu_dialog.xml
<!-- header -->
<LinearLayout
android:background="@drawable/menu_dialog_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal|center"
android:padding="8dp"
android:orientation="horizontal" >
...
Bạn có thể theo dõi điều này không? – Bostone