Android picture is too large to display properly

Android picture is too large to display properly

reason

  • There is a memory limit in Android, beyond which resources cannot be displayed

Solution

  • Configure the memory in the global configuration file [key: android:largeHeap="true"]

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="包名">
        <application
            <!--是否牺牲内存来提高响应速度-->
            android:hardwareAccelerated="false"
            <!--是否可以使用最大内存值-->
            android:largeHeap="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:theme="@style/AppTheme">
            <activity
                android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    </manifest>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325766212&siteId=291194637