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?
dip is as same as a dp. Using sp/dp will make your Android applications compatible with multiple screen densities and resolutions. Highly active question.
The terms DP and DIP refer to Density Independent Pixels, which are based on the physical density of the screen. SP: Similar to dp, but also scaled by the user's font size selection. When choosing font sizes, it is recommended that you use this unit so that they are adjusted for both screen density and user choice.
The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your application's UI, to ensure proper display of your UI on screens with different densities.
Commonly used as light switches in your household, all electrical switches can practically turn on and off any electronic device. We categorise switches as single-pole (SP) or double pole (DP) switches based on their working mechanism and functionality.
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With