Parse add-on supplied layout devices.

Add-ons are expected to provide a file called devices.xml in their root
folder. The XML schema for this file is
	eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/layout-configs.xsd

I slightly fixed the schema so that normal screen size use the token
"normal" instead of "medium" to match the resource qualifier.

To round up the feature, the following changes are included:
- getEnum in the resource qualifier enum has been made public. There's no
sense in keeping it private and it'll help with people possibly using
valueOf which behaves differently (case sensitive so
ScreenSize.valueOf("normal") fails, while getEnum on the same string succeed.
- Updated the device configuration UI to deal with missing list of
devices while the SDK loads.

Change-Id: Ib1b01007d2ae7fd6398172c3549b2686c33d48be
This commit is contained in:
Xavier Ducrohet
2009-09-27 21:39:07 -07:00
parent 3a68366197
commit 98b9c10e63
20 changed files with 496 additions and 155 deletions

View File

@@ -78,6 +78,8 @@ public final class SdkConstants {
public final static String FN_PLUGIN_PROP = "plugin.prop";
/** add-on manifest file */
public final static String FN_MANIFEST_INI = "manifest.ini";
/** add-on layout device XML file. */
public final static String FN_DEVICES_XML = "devices.xml";
/** hardware properties definition file */
public final static String FN_HARDWARE_INI = "hardware-properties.ini";