I'm designing a screen, importing the assets and dimensions from Zeplin. I'm not able to figure out why the UI looks different on 2 different devices with the same screen size and density (xxhdpi). I have included the screenshots of how it looks on the Pixel 2 and how it looks on the Nexus 5 (Both are 5' phone with xxhdpi density)
[1]: Pixel 2 : https://i.stack.imgur.com/vgCTe.png
[2]: Nexus 5 : https://i.stack.imgur.com/NFl0q.png
use this library for good create xml i use it it will supp all device and all screen size
SDP - a scalable size unit An android SDK that provides a new size unit - sdp (scalable dp). This size unit scales with the screen size. It can help Android developers with supporting multiple screens. sdp for wiget => https://github.com/intuit/sdp
SSP - a scalable size unit for texts An android SDK that provides a new size unit - ssp (scalable sp). This size unit scales with the screen size based on the sp size unit (for texts). It can help Android developers with supporting multiple screens.
ssp for textsize => https://github.com/intuit/ssp