Created a Layout with a display resolution of 1080x1920 320dpi. Added on layout ImageView with image from drawable / image.png. The size of this very image is 350x150px, but in fact on the Layout it is obtained over the entire width of the screen and if you set android: layout_width and android: layout_height as "wrap_content".
Why is that?

How to properly place an image of the size it should be?

  • 2
    I would take a look at the markup itself - Amandi
  • At a minimum, place the image in the appropriate DPI folder. For 320 DPI this is xhdpi - Vladyslav Matviienko
  • And why not immediately make an asset from the image, androyd himself will determine which image to use, depending on the screen size? - Ivan Vovk

0