I have a design problem with the app I'm working on, and I'd like some more general/conceptual advice rather than actual coding advice. I noticed that objects I size in sp/dp look very different on different devices, and Samsung Galaxy (all of them) in particular give me a lot of grief.
Here are two screenshots:
The texts outlined in red are set to 13sp. And box sizes and margins/paddings are in dp. All of the settings on VMs are default, including text size.
On most devices the app looks like on Xperia here, but on Galaxies and some select LGs things are a lot bigger than they should be. I was under the impression that sp/dp were created to help make things look the same on different devices, but apparently I'm wrong. So, what am I missing?
At the moment, when I want objects to look more or less similar on different devices, I calculate their size in pixels in proportion to screen size, but I understand that it's wrong.
Aucun commentaire:
Enregistrer un commentaire