Search code examples
androidscreenandroid-manifestresolutionmdpi

I want my app to support only xlarge screens with mdpi density


I'm developing an app that only supports tablets for now. But I don't have high res photos for tablets with higher density (Like latest Asus tablet with ~230 dpi, 1920X1200, I think it's called TF700T or something like this), and I don't want to start testing the ui on this screen. I have only mdpi photos for most of the general tablets today (1280x720 and 10.1'), and I developed the app on a tablet with this screen, which is the common size of tablets today.

I know how to set the app to support only xlarge screens, but I also want it to support only mdpi screens. I couldn't figure out a way for doing it from Android Developers guides.

My manifest for now:

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

Thanks, Elad


Solution

  • Use <compatible-screens>:

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

    See: http://developer.android.com/guide/topics/manifest/compatible-screens-element.html

    Though creating an app that is highly resolution-dependent like this is not a particularly good strategy.