Is dp the same as dip?

AndroidDimensions

Android Problem Overview


> Possible Duplicate:
> Difference of px, dp, dip and sp in android

I've found several topics on this. But none really answers my question.

Dp and dip in android. What is the difference? Is it the same thing?

Android Solutions


Solution 1 - Android

Yes, they are the same. There is no difference, its just an alias.

Documentation:

> The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".

Solution 2 - Android

dp Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".

https://stackoverflow.com/questions/2025282/difference-of-px-dp-dip-and-sp-in-android/2025541#2025541

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionjohanView Question on Stackoverflow
Solution 1 - AndroidWarrenFaithView Answer on Stackoverflow
Solution 2 - AndroidPratikView Answer on Stackoverflow