Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Difference between px,dp,sp,dip in android

    • 0
    • 2
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 272
    Comment on it

    Difference between px,dp,sp,dip

    They all make UI compatible for Android Devices


    px: Its the standard pixel. We cas say actual pixel on the screen or one pixel.

    px = dp * (dpi / 160)
    


    dp: (Density Pixels). Its based on physical density of any screen.We can say simply for 160 dp screen, one dp is equal to one pixel.

    Use dp except for font size.


    dip: (Density Independent Pixels) dip is similar to dp. Earlier version, dip was used but now we use dp.


    sp: (Scale Independent Pixels) : It is also like dp we use it when define font sizes. It also scaled by font preferences , So for Fonts we should use sp.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: