Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDanny Chang
Courses Plus Student 1,150 PointsHow about "dp"?
When I type 24 in the textsize and without "sp", it just automatically shows "dp". What is "dp" means?
1 Answer
Viktor Johansson
3,523 PointsDP is density-independent pixels. It corresponds to the physical size of a pixel at 160 dpi.
Danny Chang
Courses Plus Student 1,150 PointsThanks a lot~ Viktor Johansson
Lewis Cowles
74,902 Pointshttps://en.wikipedia.org/wiki/Device_independent_pixel
also
BTW ignore Wikipedia's use of the word device, the word density refers to the devices pixel density for high-resolution modern screens
Lewis Cowles
74,902 PointsLewis Cowles
74,902 Pointsyou should select Viktor's answer so others know this is answered