Support-Screens in Manifest File

后端 未结 2 1992
生来不讨喜
生来不讨喜 2020-12-20 17:08

This is my code in my android manifest file.

supports-screens android:resizeable=\"true\"
              android:smallScreens=\"true\"
              android:         


        
相关标签:
2条回答
  • 2020-12-20 18:03

    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 also different layouts for portrait and landscape views by specyfing another keyword in directory's name:

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

    Remember that tags order is important, so you can't write layout-portrait-small.

    And in last add this code to your manifest file:

    <supports-screens 
        android:resizeable="true"
        android:smallScreens="true" 
        android:largeScreens="true"
        android:xlargeScreens="true"  
        android:normalScreens="true" 
        android:anyDensity="true"/>
    
    0 讨论(0)
  • 2020-12-20 18:08

    Please have a look at the Android Training site for "Designing for Multiple Screens"

    0 讨论(0)
提交回复
热议问题