aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-09-12 12:11:47 -0700
committerTor Norbye <tnorbye@google.com>2012-09-17 07:43:29 -0700
commitfe51dba2aa25e559786e5da315d4db714ffe7559 (patch)
tree058d343ffda252403da6b47813d6ab1eac1af711 /common
parentd38457bd813f7591e13a58bf91655192d761d81a (diff)
downloadsdk-fe51dba2aa25e559786e5da315d4db714ffe7559.zip
sdk-fe51dba2aa25e559786e5da315d4db714ffe7559.tar.gz
sdk-fe51dba2aa25e559786e5da315d4db714ffe7559.tar.bz2
Support separate layout editors for a single layout resource
This changeset changes the "reuse" behavior of the layout editor to no longer reuse the same layout editor when you are switching between alternate layout files for the same layout resource, such as layout/foo.xml and layout-land/foo.xml. This lets you more quickly switch back and forth and inspect differences between the layouts, etc. There is also an option in the Android > Editors panel to turn on single editor sharing again. The biggest part of the changeset, by far, is a cleanup of the ConfigurationComposite class and associated code. This was necessary not just to support the above feature (where we need to "back out" UI changes when you've made a configuration edit which results in a different file getting opened), but it's also an important preparation for multi configuration editing, where we need to be able to switch configuration settings in and out of a single configuration editor, etc. The configuration data itself is now in a separate Configuration class; the UI is in ConfigurationChooser, and the configuration matching code is in ConfigurationMatcher. There's also a new Locale class to track language/region pairs instead of using 2-element ResourceQualifier arrays. The various menu listeners are also in separate UI classes now. While there are new classes, most of the configuration matching algorithm is unchanged, just moved to a new class and the UI syncing and configuration data lookup replaced. Bitmasks are used to handle configuration changes, such that updating multiple related attributes (e.g. a rendering target change also causes a theme change if say Holo isn't available) can now be processed just once with a single change call. (Various other cleanup too.) Change-Id: I04ac969f46824321be3db0c487ef077c03cc6012
Diffstat (limited to 'common')
-rw-r--r--common/src/com/android/SdkConstants.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/src/com/android/SdkConstants.java b/common/src/com/android/SdkConstants.java
index d2f1421..53277c5 100644
--- a/common/src/com/android/SdkConstants.java
+++ b/common/src/com/android/SdkConstants.java
@@ -26,9 +26,15 @@ import java.io.File;
* <li><code>OS_</code> OS path constant. These paths are different depending on the platform.</li>
* <li><code>FN_</code> File name constant.</li>
* <li><code>FD_</code> Folder name constant.</li>
+ * <li><code>TAG_</code> XML element tag name</li>
+ * <li><code>ATTR_</code> XML attribute name</li>
+ * <li><code>VALUE_</code> XML attribute value</li>
+ * <li><code>CLASS_</code> Class name</li>
+ * <li><code>DOT_</code> File name extension, including the dot </li>
+ * <li><code>EXT_</code> File name extension, without the dot </li>
* </ul>
- *
*/
+@SuppressWarnings("javadoc") // Not documenting all the fields here
public final class SdkConstants {
public static final int PLATFORM_UNKNOWN = 0;
public static final int PLATFORM_LINUX = 1;
@@ -690,7 +696,7 @@ public final class SdkConstants {
public static final String ATTR_LAYOUT_RESOURCE_PREFIX = "layout_"; //$NON-NLS-1$
public static final String ATTR_CLASS = "class"; //$NON-NLS-1$
public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
-
+ public static final String ATTR_CONTEXT = "context"; //$NON-NLS-1$
public static final String ATTR_ID = "id"; //$NON-NLS-1$
public static final String ATTR_TEXT = "text"; //$NON-NLS-1$
public static final String ATTR_TEXT_SIZE = "textSize"; //$NON-NLS-1$