search

Home  >  Q&A  >  body text

android有ldpi, mdpi, hdpi, xhdpi这些drawable文件夹,系统是依据什么去选择的?

问题1:比如同样1080p的屏幕在4寸和5寸上dpi不一样,android系统是不是根据dpi选择不同的资源的呢,如果有些只放xhdpi,遇到hdpi,mdpi,系统又是怎么操作的?

问题2:如下图的dimens是什么原理?我算了下大部分手机是360dp和320dp,那为什么以w320p为基准?


黄舟黄舟2771 days ago567

reply all(3)I'll reply

  • 黄舟

    黄舟2017-04-17 17:35:06

    1. As long as you have a copy of xhdpi, when the resolution is smaller than the value of xhdpi, the corresponding image resources will be automatically compressed

    reply
    0
  • PHPz

    PHPz2017-04-17 17:35:06

    It is recommended to read this article——
    http://blog.csdn.net/guolin_b...
    There is a very detailed analysis of Drawable

    reply
    0
  • 迷茫

    迷茫2017-04-17 17:35:06

    The ppi of the screen: the number of diagonal pixels of the screen divided by the diagonal size.

    reply
    0
  • Cancelreply