Search code examples
androidresponsive-designscreen-orientationscreen-resolutionscreen-size

Using dp for same dimension is not working for different phones of different resolutions but same dimention


I am working on an app which must support all the sizes. Since the 1920x1080 is wider than 480x800, I am unable to give the best fit for both at same time for landscape view. Where as they lie under same dimension. There is no problem with the portrait view cause it has really a small amount of difference on portrait view but when turning it to landscape view the entire thing is not coming in the screen.

This is the view of 1920x1080.

enter image description here

This is the view of 480x800

enter image description here

Both these sizes are accessing their xml file from layout-sw320dp-land

I'm only facing this problem for hdp screens that is layout-sw320dp screens since it has a very small space to work with. And there is no such problem for higher screen sizes since we have enough space to decorate.

Can anyone help me to sort out this problem?

We have many questions and answers for this problem but I'm unable to get the perfect solution for this.

Thanks in advance.


Solution

  • This worked for me more than perfect. layout-sw320dp-land-hdpi and layout-sw320dpi-land-xhdpi