ultra understand of android dp

dp this conception always confuse me a lot , but why dp so complicated becasue they create a lot term like dpi , px ,  show same size in diffrrent dpi device ... that's why it confuse me a lot ,  but after I deeply thought it it turn out so simple  dp is just device size relevent , don't relevent to anything else .      let's see this formulate,  device    dp = whole px( inch * dpi)  *  160px/dpi = inch * 160 ,  so dp basicly is inch * 160 , that's so simple conception .  i don't know why a lot document explain it looks so hard really confuse me long time.  so generally we can say  a device dp just relevent to ince ,    1dp = inch / 160 .  so it can consider 1dp is  1 inch / 160 , so dp basicly just a inch unit .  that's so simple .  just i think it too comlicated , so a fixed physical size device it's whole dp is fixed .  but like STB , TV those device it may don't have a real releave physical size .  like STB it have a virutal window , so the virtual window size is 8 inch so the whole dp is 1280 dp .  whatever dp is just equal  1/160 inch that's my genersize . 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值