简体   繁体   中英

How to set minimum screen size?

I have created new app, which not for phones. I was based my app to 7" tablet devices. When I try put my app in play store it show, that my is supported to 2000 android devices, but not all is tablets. Acctually, I don't want google all it devices and set filters, you know why!

How I can progammatically declare mininum screen size in my app, like I can set minimun sdk level.

Update:

I was set in AndroidManifest.xml <compatible-screens> and <supports-screens> like that:

<supports-screens android:requiresSmallestWidthDp="600"
              android:smallScreens="false"
              android:normalScreens="false"
              android:largeScreens="false"
              android:xlargeScreens="true"
             />


<compatible-screens>
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="ldpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="hdpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="mdpi"/>


</compatible-screens>

Now my app is only for 7+ inches tablets.

You need to use <supports-screens> as DJHacktorReborn suggested, but not just android:requiresSmallestWidthDp , because the Play Store does not use that for filtering.

Instead, use:

<manifest ... >
    <supports-screens android:smallScreens="false"
                      android:normalScreens="false"
                      android:largeScreens="true"
                      android:xlargeScreens="true"
                      android:requiresSmallestWidthDp="600" />
    ...
    <application ... >
        ...
    </application>
</manifest>

See the documentation for more.

you can define in manifest like this for more detail on mutliScreenSupport

 <manifest ... >
        <supports-screens android:requiresSmallestWidthDp="600" />
        ...
    </manifest>

For market filter you need to use <compatible-screens> More Details

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM