yarightok

 

原文:Android中dp和px之间进行转换

 

官方文档:http://developer.android.com/guide/practices/screens_support.html

The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen.

The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160).

 

分类:

技术点:

相关文章:

  • 2022-02-16
  • 2022-12-23
  • 2021-09-01
  • 2021-12-24
  • 2022-02-05
  • 2022-01-03
  • 2022-02-15
  • 2021-12-19
猜你喜欢
  • 2022-01-16
  • 2021-10-21
  • 2022-03-04
  • 2022-03-04
  • 2022-12-23
  • 2022-02-07
  • 2021-07-31
相关资源
相似解决方案