program my content on a 3.2 "mdpi screen and I realize that there is another 5.1" mdpi and its content looks small?

0

program the content of my app for a 3.2 "mdpi screen and it fits well, but when changing the view mode to a 5.1" mdpi it does not fit, help with this problem.

3.2 "mdpi

5.1 "mdpi

    
asked by Gean BCone Angulo 27.01.2017 в 05:36
source

2 answers

2

This is totally natural since if both are in MDPI, the images do not enlarge or shrink. Generally the devices (in the market) with more inches, will have higher MDPI density and therefore there will be no problem and they will look good. In the example you show in Android Studio it would be an extreme case.

However if you would like to change the size, width, height or padding and margins you can create folders for the dimensions:

values-xlarge
values-large
values-small
values-normal

In each folder you would have a file dimens.xml with sizes such as:

<dimen name="ancho_imagen">48dp</dimen>

And in another folder another size, the equivalences are the following:

For example, if the screen is 5 inches, the measurement (size or value) that is in the values-large folder will be used.

This would use the value in any View for example:

android:layout_width="@dimen/ancho_imagen"
    
answered by 27.01.2017 / 06:17
source
0

Sincerely, the layout looks very good. The elements will never be seen exactly the same on all devices.

In addition, thanks to working in dps and not in sizes relative to the screen with scaling, a large screen can be used.

Greetings.

    
answered by 29.01.2017 в 06:41