2
I’m running the app on two emulators that have exactly the same resolution but different densities:
- 720 x 1280 160dpi
- 720 x 1280 320dpi
I want the image to take the same space on the screen. I understand that, using DP, the density becomes indifferent, because the system calculates the amount of pixels according to the density and the space that the image should have on the screen. However, this does not happen:
How to reach this value in PD so that an image takes exactly the same space on screens with different sizes and densities?
XML:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/logo"
android:layout_width="200dp"
android:layout_height="200dp"
android:src="@drawable/logo"
android:layout_centerInParent="true"/>
</RelativeLayout>
Post the xml you are using.
– ramaral
The image emulators you posted have different resolutions.
– ramaral
Actually, I uploaded the wrong image. They have the same resolution as I mentioned. I will edit with XML
– Levy Schiavetti