Support Screens in the manifest file

This is my code in the Android manifest file.

supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" 

What I understand from supportscreens is that it can be used to simply fit the application screen into several screen sizes by resizing it and stretching the image. However, I do not see any difference with or without this code. Can anybody help me?

+4
source share
2 answers

Just like this:

  /res/layout/layout.xml // Default layout /res/layout-small/layout.xml // Small screens /res/layout-large/layout.xml // Large screens /res/layout-xlarge/layout.xml // Ex 

You can go even further and make different layouts for portrait and landscape views by specifying a different keyword in the directory name:

  /res/layout-small-land/layout.xml // Small screens, landscape view /res/layout-small-portrait/layout.xml // Small screens, portrait view 

Remember that the order of the tags is important, so you cannot write a mock-portrait-small.

And in the latter case, add this code to the manifest file:

 <supports-screens android:resizeable="true" android:smallScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:normalScreens="true" android:anyDensity="true"/> 
+8
source

Please check out the Android Learning Site for โ€œMulti-Screen Designโ€

+1
source

Source: https://habr.com/ru/post/1489631/


All Articles