我有一个没有布局的活动。我直接在AndroidManifest
中将它设置为主题:
android:theme="@style/MyTheme">
我的主题只包含一个背景:
<style name="MyTheme"
<item name="android:windowBackground">@drawable/background</item>
</style>
这是仅包含一个项目的后台文件:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="200dp"
android:height="200dp">
<bitmap
android:gravity="center"
android:src="@mipmap/ic_launcher"/>
</item>
</layer-list>
ic_launcher
是具有不同大小(hdpi,mdpi等)的图标。问题是,如果我将width
和height
设置为200dp
,项目会变大但图像仍然很小。如果我将width
和height
设置为bitmap
没有任何反应。
如何增加实际图片的宽度和高度?
在这种情况下,您应该尝试使用Vector Image
以获得适合任何高度或比例的质量。