14

I've recently released an app but the ui really isn't ready for larger tablet screen so until I get this fixed I've filtered out certain devices with an xlarge screen size using compatible screen tags:

<compatible-screens>
    <screen
        android:screenDensity="ldpi"
        android:screenSize="small" />
    /* All sizes up to large xhdpi */
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="large" />
</compatible-screens>

Unfortunately, declaring compatible screen sizes like this in the manifest excludes the S4. I can't find a way of specifying compatible screens and not excluding the S4.

Note, a very similar question has been asked here but the accepted answer (which indicates that at 441dpi the S4 falls under the xxhdpi screen density bucket) does not help in this particular situation as xxhdpi is not a valid manifest attribute value for screen density.

EDIT:

Many thanks for CommonsWare's answer below. The correct bucket for the S4 is then:

<screen
    android:screenDensity="480"
    android:screenSize="normal" /> 
Community
  • 1
  • 1
user1173706
  • 2,612
  • 3
  • 19
  • 29

1 Answers1

35

Use 480 instead of xxhdpi in the <screen> element.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 1
    For me the S4 is still not supported with these screen settings, any idea why? – Display name Jun 03 '13 at 10:39
  • I believe it S4 is screenSize="large" – keaukraine Jul 19 '13 at 11:27
  • @keaukraine That is not correct.. Using only the `small` and `medium` screensize (with the `480` support) works for Xperia Z, Galaxy S4 and HTC One. – Rob Sep 30 '13 at 10:08
  • where to put dimens file for xxhdpi?? – Rishabh Srivastava Oct 30 '13 at 07:26
  • @Seppl did this one got working for you ?, if yes what are the changes you have done.... – Renjith K N Jan 30 '14 at 08:05
  • 1
    @RenjithKN In the end this was the working solution. The problem I had was that I uploaded the apk for testing as alpha release, and then the supported devices wasn't updated. As a normal apk release the devices were updated correctl and it worked – Display name Jan 30 '14 at 10:16
  • @CommonsWare Is the `xxhdpi` string still unsupported? I keep getting the `String types not allowed` error. Also, are other `xxhdpi` screens (e.g. Nexus 5, HTC One) supported? Can you provide links where this is better documented? – doplumi Mar 04 '14 at 22:20
  • 1
    @domenicop: "Is xxhdpi still unsupported?" -- I avoid `` like the plague, so I have not looked into this recently. [The documentation](https://developer.android.com/guide/topics/manifest/compatible-screens-element.html) advises you to continue using `480`, though. "Also, are other xxhdpi screens (e.g. Nexus 5, HTC One) supported?" -- `xxhdpi` is `xxhdpi`, regardless of who makes it. "Can you provide some link where this is better documented (if they exists)?" -- https://developer.android.com/guide/topics/manifest/compatible-screens-element.html – CommonsWare Mar 04 '14 at 22:24