3
我需要爲層列表中的項目設置大小。用作啓動活動中的windowBackground。我寫了這個XML文件,Android Studio正確顯示它。但在應用程序中,徽標始終全屏顯示。如何做到這一點?層列表中的Android項目大小
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:endColor="#000004"
android:gradientRadius="1000"
android:startColor="#1f3371"
android:type="radial" >
</gradient>
</shape>
</item>
<item>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/texture_5"
android:tileMode="repeat" />
</item>
<item android:drawable="@drawable/logo"
android:height="100dp"
android:width="77dp"
android:gravity="center"
>
</item>
</layer-list>