Android位图图像未锐化

问题描述 投票:0回答:1

我在Flutter中包含了我的android应用程序的启动图像。但是,此图像太模糊或太大。当我在硬盘上查看图像时,图像很清晰。如何保持图像清晰?

/ res / drawable / launch_background.xml:

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/background" />

    <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable/icon_transparent_256" />
    </item>
</layer-list>

/ res / values / styles.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <!-- Show a splash screen on the activity. Automatically removed when
             Flutter draws its first frame -->
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
</resources>

当前结果:screenshot

实际图像:logo

java android flutter png android-bitmap
1个回答
0
投票

[正如@Michael Dougan指出的,图像尺寸太小,最好将图像保存为不同的尺寸(例如/res/drawable/),而不是将启动图像的一个版本保存在/res/mipmap-xxxhdpi中]]

© www.soinside.com 2019 - 2024. All rights reserved.