无法使用背景图片,因为背景图片变得模糊

问题描述

我想使用unsplash(jpg 3456 * 5184,3.21mb)中的图像作为我在android项目中的一项活动的背景图像。我在anydpi部分的drawable文件夹中添加了图片。图片正是 与原始图片相同,但是当我在像素3xL模拟器以及真实设备上运行时,它显示的是如此朦胧,以至于 所以无法帮助我... 这是我的XML文件代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:id="@+id/nonotes"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".empty_activity">


    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY"
        android:background="@drawable/background" />




    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:rotation="-45"
        android:text="Nothing To Show"
        android:textSize="100sp"
        android:textStyle="bold" />


    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/add"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true"
        android:src="@android:drawable/ic_input_add" />

</RelativeLayout>

Studio Preview

Emulator Preview

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)