About Andrews screen adaptation

   A. Non-drawable adaptation

     For non-adapted the drawable (e.g. textview, button controls, etc.) is recommended to use relative placement, is adapted to scale.

     In the opposite arrangement, the first mobile phone acquires the width and height, and then specify the proportion occupied by each control in the phone, and then set the margin value to ensure the control effect of different resolutions displayed on a mobile phone and dpi is the same.



Two. Drawable adaptation

     Usually picture resources.

    If the desired image is displayed on different phone visual effect is the same, i.e., A and B, in two different resolutions, and dpi phone, visual images are the same width and height (in fact, the resolution is not the same)

    You would only need a drawable resource, in xhdpi, hdpi, mdpi and other packages in Android store to scale the image to correspond.

    

    If you want to display on different phone picture visual effects are not the same, it is generally desirable in high-resolution large-screen phone display bigger picture, the picture is displayed on a small screen phones smaller.

  You may establish additional drawable directory to place the need to change the picture. For example drawable-xhdpi-1920 * 1080, the corresponding picture storage resources.

  

android screen adaptation remains to be studied, please correct me if anything is missing.


Published 11 original articles · won praise 2 · views 10000 +

Guess you like

Origin blog.csdn.net/zhengyin_tmac/article/details/53035915