]> git.saurik.com Git - android/aapt.git/commitdiff
New xlarge screen size.
authorDianne Hackborn <hackbod@google.com>
Sat, 24 Apr 2010 00:51:26 +0000 (17:51 -0700)
committerDianne Hackborn <hackbod@google.com>
Wed, 28 Apr 2010 23:51:52 +0000 (16:51 -0700)
Not complete, only for experimentation at this point.

This includes a reworking of how screen size configurations are matched,
so that if you are on a larger screen we can select configurations for
smaller screens if there aren't any exactly matching the current screen.

The screen size at which we switch to xlarge has been arbitrarily
chosen; the compatibility behavior has not yet been defined.

Change-Id: I1a33b3818eeb51a68fb72397568c39ab040a07f5

AaptAssets.cpp

index fc655a7abbb7e966d537fe1c56e9fe10d7146943..4d2d046bd921eb5198841179968bbc2c6f1e2aed 100644 (file)
@@ -766,6 +766,11 @@ bool AaptGroupEntry::getScreenLayoutSizeName(const char* name,
                 (out->screenLayout&~ResTable_config::MASK_SCREENSIZE)
                 | ResTable_config::SCREENSIZE_LARGE;
         return true;
+    } else if (strcmp(name, "xlarge") == 0) {
+        if (out) out->screenLayout =
+                (out->screenLayout&~ResTable_config::MASK_SCREENSIZE)
+                | ResTable_config::SCREENSIZE_XLARGE;
+        return true;
     }
 
     return false;