In my application, a TextView
is shown above an ImageView
which contains a SVG image. Depending on the screen resolution, the ImageView
, which is constrained (top and bottom e.g.) by another ImageView
, is scaled: thus its SVG is also scaled by decreasing its height (and width, proportionnaly). Thus, the space between the TextView
and the ImageView
is technically the same than the one in Android Studio but is visually longer.
What I would want is: to keep the same space in Android Studio than on all screen resolutions, i.e.: 8dp.
Example:
In the Android Studio's visualizator, the space is 8dp:
In a Samsung Galaxy S7, I think the space is still 8dp but the SVG has been scaled: the space seems longer.
Proof that the SVG is scaled and that the ImageView
is really at 8dp from the TextView
:
Do you know how to keep the same space than in Android Studio, whatever the screen resolution?
Warning
I really want the SVG to be scaled (so I don't want, e.g. to set scale: fitXY
or something like that). But I also want the space between the bottom of the TextView
and the top of the scaled SVG be 8dp on all screen resolutions.