I have following drawable with different sizes for mdpi, hdpi, xhdpi....
-rw-r--r--@ 1 xxx yyy 31K Apr 16 14:19 myImage.9.png
-rw-r--r--@ 1 xxx yyy 63K Apr 16 14:19 myImage.9.png
-rw-r--r--@ 1 xxx yyy 95K Apr 16 14:19 myImage.9.png
-rw-r--r--@ 1 xxx yyy 196K Apr 16 14:19 myImage.9.png
-rw-r--r--@ 1 xxx yyy 307K Apr 16 14:19 myImage.9.png
I use it as follows
<ImageView
android:paddingLeft="10dp"
android:paddingRight="0dp"
android:layout_centerVertical="true"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="fitCenter"
android:src="@drawable/myImage" />
My app at this point takes 20MB
If I make a change android:src="@null"
My app at this point takes 10MB
Why does the drawable takes so much memory where actual size is lot less??