I use 10 PNG images of 20-30 KB in imageView, but the allocated memory increases from 70 MB to 270 MB when loading this activity. So why is this too much memory allocated for these images.
This is a screenshot of the memory allocation
This is one of my images.
File size does not matter. No, it’s important that your image is 20 KB, but its resolution is quite large. When an image is loaded into memory, it is equal to the memory totalNoOfDotsInImageBitmap * 4 bytes and totalNoOfDotsInImageBitmap = width * height of the image.
4 - - ARBG (1 )
.
, , , .
, drawable nodpi-drawable, .
drawable
nodpi-drawable
, , , , , - , , , , , OOM.
, ( , ), AS PNG .
Source: https://habr.com/ru/post/1679721/More articles:Поток вложенных списков POJO в другой список POJO - javahow to get total table by adding rows of this table using jquery - jqueryLinq-SQL query is very slow when using a gateway variable compared to hard integer value code - c #Bitbucket Pipeline INSTALL_PARSE_FAILED_NO_CERTIFICATES Problem - androidComplete n tasks in d steps by backtracking - javaSaving excel as csv with a semicolon instead of a semicolon - powershellЗаполнить вектор вызовом конструктора - c++Transfer any other value from an array to a new array - javascriptCannot use boolean value as thenable construct in Typescript? - javascriptRobolectric 3.3 с Theme.AppCompat - androidAll Articles