For multi-screen adaptation in Android, you can place layout files in the layout_hdpi/layout_mdip/layout_ldpi/layout directory.
If a big screen mobile phone is adapted, the adaptation sequence is layout_hdpi-> layout_mdpi-> Layout-> layout_ldpi;
If an on-screen mobile phone is applicable, the adaptation sequence is layout_mdpi-> Layout-> layout_hdpi-> layout_ldpi;
If the mobile phone of a small screen is adapted, the adaptation sequence is layout_ldpi-> Layout-> layout_mdpi-> layout_hdpi;
Assume that the default layout file of an application is placed in the layout directory. If some interfaces have problems with adaptation to the mobile phone on the screen, the layout file is customized separately and placed in the layout_ldpi directory.
Is there a problem? From the above adaptation sequence, when this interface is displayed on a big screen mobile phone, the order for searching layout files is layout_hdpi-> layout_mdpi-> Layout-> layout_ldpi, you can see that the layout file of the screen is in layout_mdpi, not layout.
Recommended Practices:
1. By default, layout files are placed in layout_mdpi, while no files are placed in layout;
2. the default layout file is placed in layout. However, if you have customized the layout file for the special screen, you can add one copy of the layout file to the layout_hdpi/layout_mdpi/layout_ldpi directories;