Android spacing issue in same resolution devices 1080x1920

吃可爱长大的小学妹 提交于 2019-12-07 20:25:16

问题


I am designing screen from Zeplin. (Zeplin provides each item attributes in dp)

Following is the horizontal recycler view design example with 4 items from Zeplin.

360 dp means 1080 for xxhdpi devices

I am testing my code on two 1080 devices with different dpi

  1. Samsung c5 [1080 x 1920 pixels, 16:9 ratio (480dpi)]
  2. Nexus 5X [1080 x 1920 pixels, 16:9 ratio (420dpi)]

I am facing spacing issue in Nexus-5x, the Zeplin design works great on Samsung-c5.

Samsung-c5 result

Nexus-5x result - spacing issue in horizontal recycler view

QUESTION:

Why the design in different on same resolution (1080x1920) devices (different dpi). How can I make it look same on each and every device like facebook does with its status


Similar Questions:

  1. How to use 1080x1920: 420 dpi - Android studio

  2. Android xxhdpi, 420 dpi and 480 dpi

  3. XXHDPI Layout different on different XXHDPI devices

  4. Sol1 - Calculator app different layout on same screen size but different DPI (420 DPI vs 480 DPI) - Android Developer

  5. Sol2 - Android layout folders for different screen sizes


回答1:


Placing dimens in values-w410dp worked, as mentioned in the answer here



来源:https://stackoverflow.com/questions/57287392/android-spacing-issue-in-same-resolution-devices-1080x1920

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!