我的启动画面图像总是有一些圆角的白角

My splash screen image always gets some rounded white corners

我已经尝试添加和减去很多东西,但每当我的初始屏幕启动时,图像中总是有一个圆角或一种高度。

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#3c3734"
tools:context="com.example.akshay.athleticgo.SplashScreen">
<ImageView
    android:id="@+id/splash_logo"
    android:adjustViewBounds="true"
    android:elevation="0dp"
    android:fitsSystemWindows="true"
    android:background="#3c3734"
    android:src="@mipmap/ath_splash"
    android:layout_height="match_parent"
    android:layout_width="match_parent"/>

</FrameLayout>

这是我正在使用的风格

    <style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowIsTranslucent">true</item>
</style>

因为您使用的是 mipmap 文件夹中的图像,而 mipmap 仅适用于 launcher 图标。大多数情况下启动器图标具有渐变 border/shadow。我认为您的图片有 gradient 边框。先检查你的图像。

最佳做法是将 image 资源文件放入 drawable 文件夹中,然后根据需要将其使用(android:src="@drawable/ath_splash")到 views 中。