2 * Copyright (C) 2009 The Android Open Source Project
\r
4 * Licensed under the Eclipse Public License, Version 1.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.eclipse.org/org/documents/epl-v10.php
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 package com.android.ide.eclipse.adt.internal.sdk;
\r
20 import java.io.InputStream;
\r
23 * Public constants for the sdk-repository XML Schema.
\r
25 public class LayoutConfigsXsd {
\r
27 /** The XML namespace of the layout-configs XML. */
\r
28 public static final String NS_LAYOUT_CONFIG_XSD =
\r
29 "http://schemas.android.com/sdk/android/layout-configs/1"; //$NON-NLS-1$
\r
32 * The "layout-configs" element is the root element of this schema.
\r
34 * It must contain one or more "device" elements that each define the configurations
\r
35 * available for a given device.
\r
37 * These definitions are used in the Graphical Layout Editor in the
\r
38 * Android Development Tools (ADT) plugin for Eclipse.
\r
40 public static final String NODE_LAYOUT_CONFIGS = "layout-configs"; //$NON-NLS-1$
\r
43 * A device element must contain at most one "default" element followed
\r
44 * by one or more ""config" elements.
\r
46 * The "default" element defines all the default parameters inherited
\r
47 * by the following "config" elements. Each "config" element can override
\r
48 * the default values, if any.
\r
50 * A "device" element also has a required "name" attribute that represents
\r
51 * the user-interface name of this device.
\r
53 public static final String NODE_DEVICE = "device"; //$NON-NLS-1$
\r
56 * The "default" element contains zero or more of all the parameter elements
\r
57 * listed below. It defines all the parameters that are common to all
\r
58 * declared "config" elements.
\r
60 public static final String NODE_DEFAULT = "default"; //$NON-NLS-1$
\r
63 * The "config" element contains zero or more of all the parameter elements
\r
64 * listed below. The parameters from the "default" element (if present) are
\r
65 * automatically inherited and can be overridden.
\r
67 public static final String NODE_CONFIG = "config"; //$NON-NLS-1$
\r
70 public static final String NODE_SCREEN_SIZE = "screen-size"; //$NON-NLS-1$
\r
72 public static final String NODE_SCREEN_RATIO = "screen-ratio"; //$NON-NLS-1$
\r
74 public static final String NODE_SCREEN_ORIENTATION = "screen-orientation"; //$NON-NLS-1$
\r
76 public static final String NODE_PIXEL_DENSITY = "pixel-density"; //$NON-NLS-1$
\r
78 public static final String NODE_TOUCH_TYPE = "touch-type"; //$NON-NLS-1$
\r
80 public static final String NODE_KEYBOARD_STATE = "keyboard-state"; //$NON-NLS-1$
\r
82 public static final String NODE_TEXT_INPUT_METHOD = "text-input-method"; //$NON-NLS-1$
\r
84 public static final String NODE_NAV_METHOD = "nav-method"; //$NON-NLS-1$
\r
86 public static final String NODE_SCREEN_DIMENSION = "screen-dimension"; //$NON-NLS-1$
\r
88 public static final String NODE_SIZE = "size"; //$NON-NLS-1$
\r
91 * The "name" attribute, used by both the "device" and the "config"
\r
92 * elements. It represents the user-interface name of these objects.
\r
94 public static final String ATTR_NAME = "name"; //$NON-NLS-1$
\r
97 * Helper to get an input stream of the layout config XML schema.
\r
99 public static InputStream getXsdStream() {
\r
100 return LayoutConfigsXsd.class.getResourceAsStream("layout-configs.xsd"); //$NON-NLS-1$
\r