How to design on Google’s Pixel XL?

almost 7 years ago from Martijn Otter, Designer

  • Lee Beckwith, over 6 years ago

    Ok maybe I don't understand the meaning of density, because wouldn't it be easier to just use 360x640 artboards or some multiple of 360, since 1080/360 = 3, and 1440/360 = 4, vs. the repeating decimals of using 411 or 415, both of which are only close to the true number of 1080/2.6 or 1440/3.5. Including the material design spec, why aren't the @1x guidelines designed for 360/640 artboards, or 720/x artboards. It seems the piece missing in my comprehension is the 2.6x and 3.5x density information. I don't get why this piece makes us design in artboards of /2.6 or /3.5 size, instead of simply a multiple of the screen's pixel dimensions (1080 or 1440 wide). Thanks for all your explanations btw!

    0 points
    • Marc EdwardsMarc Edwards, over 6 years ago

      The device’s UI density is used to scale Android’s dp units to the screen pixels.

      This means 1 dp will become 2.6 pixels on the Pixel. If you want to deal with dp units on your canvas when designing, you need to use a canvas that’s the screen res divided by 2.6. Dividing by 2.6 results in a fraction, so it has to be rounded up or down. It’s not as perfect as working with integer scaled displays, but I still think working at 1× is the best way to go.

      Hopefully that makes the maths a bit clearer?

      It’s worth noting that 1 dp becoming 2.6 pixels is a little more complex than noted above, when it comes to the final app running on the device — bitmap assets will be bitmap scaled down from the nearest larger size (probably 3×), and view sizes will be rounded so they align on a pixel boundary.

      0 points