Android mipmap image density?

As you can now find out that Android version 1.1 creates new image objects in the mipmap-xxx folders instead of drawable-xxx when creating assets using the IDE. The problem I am facing is that the android accepts these images as β€œicons” when I use them in my xml files, so I lose density when I try to display them in the correct size. For example, using this code:

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="32dp"
        android:src="@mipmap/ic_login_logo" />

I get the correct density, but the wrong size, and if I do this:

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:layout_marginTop="32dp"
        android:src="@mipmap/ic_login_logo" />

I get the right size ... but the wrong density. I am not a professional UI / UX, and before I did not come across this problem with the help of drawings. I can’t even add my resources to the drawable-xxx folder from the IDE: enter image description here

Is there a workaround for this? Thank.

+4
1

mipmap-. Google blogspot:

mipmap- ( ), , .

.

, , mipmap-xxx drawables, drawable-xxx, .

+1

All Articles