My project doesnt support multiple devices screen view

后端 未结 4 1545
借酒劲吻你
借酒劲吻你 2021-01-29 02:37

I have an menuscreen XML. When I open the project wide screen Its not adapted all screen size. How can I overcome this problem.

When I want to add picture about this pro

4条回答
  •  遇见更好的自我
    2021-01-29 03:05

    In android you have to set images in different different drawable as per screen size and make layout as per screen size also.

    res/layout/my_layout.xml(drawable also like layout) ---- default layout. 
    res/layout-layout-hdpi/my_layout.xml ---- layout for hdpi screen size 
    res/layout-layout-large-hdpi/my_layout.xml ---- layout for large hdpi screen size 
    res/layout-layout-mdpi/my_layout.xml ---- layout for mdpi screen size(normal tables also) 
    res/layout-layout-Xdpi/my_layout.xml ---- layout for Xhdpi screen Size(high resolution)
    

提交回复
热议问题