Difference between px sp dp dip in Android
- dp : Full form of dp is density-independent pixel. dp is a type of abstract unit based upon physical density size of android mobile screen. According to Google android developers 1dp is mostly equal to 1 px.
- dpi : Full form of dpi is Dot per inch.
- sp : Full form of sp is Scale independent pixel. sp is mostly used to scale android applications font size. Sp is recommended to used to declare application font sizes.
- pt : Full form of pt is Points represents 1/72 of inch based upon android mobile phone screen.
- px : Full form of px is pixels are represents each and every pixel of real screen. The screen can be anyone’s device like TV, computer, Led, LCD etc.
- mm : Full form of mm is Millimetres based upon device screen size.
- in : Full form of in is Inches based upon real device screen size.sp – fonts
dp – layout
You may also like...