12d4581faa6438941e65a9dc83213be34c6ca970 |
|
13-Sep-2012 |
Tor Norbye <tnorbye@google.com> |
Constants refactoring. This changeset moves most constants into the SdkConstants class, and gets rid of AndroidConstants and LintConstants. It also migrates all non-ADT specific constants from AdtConstants into SdkConstants. It furthermore moves various other constants (such as those in XmlUtils and ValuesDescriptors) into the constants class. It also fixes the modifier order to be the canonical modifier order (JLS 8.x). Finally, it removes redundancy and combines various constant aliases such that we don't have both NAME_ATTR and ATTR_NAME pointing to "name", etc. Change-Id: Ifd1755016f62ce2dd80e5c76130d6de4b0e32161
|
0cb8e647ef345f5c2a6b7eb08b517421131bca4e |
|
07-Aug-2012 |
Tor Norbye <tnorbye@google.com> |
Improvements to relative layout move and delete operations This changeset improves the way the RelativeLayout editing support in the layout editor handles deletions and moves. First, during a move, if the move is simply within the same layout, then the layout constraints are left alone such that if you for example have A v B < C < D and you move B up to be next to A, you end up with A < B < C < D (It will however remove cycles if the move would result in them.) Second, it now handles deletion better where deleting a view will cause all references to any deleted views to be replaced by transitive constraints. For example, if you hve A < B < C < D and you delete B and C, you end up with A < D Change-Id: Icb9d3552e60aee20192f7941fe52be71ba52557f
|
85e4a1a9dd133abb879ec211ce8dd385004edf22 |
|
08-Aug-2012 |
Xavier Ducrohet <xav@android.com> |
Refactor common.jar Move resources and com.android.util.Pair into layoutlib_api where they belong since layoutlib depends on them and we need to control the API. Made a copy of Pair to stay in common.jar but moved it to com.android.utils.Pair (the one in com.android.util.Pair is marked as deprecated to prevent usage where applicable). Also moved XmlUtil and PositionXmlParser to com.android.utils to match Pair. Change-Id: I21d7057d3f2ce604f86a3bb1fa3c130948c93b89
|
a881b0b34678ad76c9f5eba62fac7a00a22ac606 |
|
20-May-2012 |
Tor Norbye <tnorbye@google.com> |
Move XML code to the common library The ManifestMerger library needs to look up the prefix to use for the Android namespace, and the Document.lookupPrefix method is not implemented by the Eclipse DOM implementation (which throws an exception). However, we have an implementation of this in the ADT plugin. This changeset creates a new XmlUtils class in the common/ library (which is accessible by both ADT and the manifest merger, and the anttasks where the manifest merger is used), and moves the namespace prefix lookup code in there. It also moves the XML escape methods into that class. It also adds a new method to the ManifestMerger for merging directly from documents (rather than files), and makes sure that all the merging code goes via the prefix utility method rather than calling the document.lookupPrefix method. Finally, it moves the various string constants associated with XML namespaces into the single XmlUtils class, since these were spread across several different classes before (and many of them are needed in the XmlUtils class). The vast majority of the diffs in this changeset are related to simple import statement changes to reflect the new locations of these constants. Change-Id: Ib8f3d0e5c89e47e61ea509a23925af7b6580abee
|
ab36f4e7488358dea4ab6b54ee2b7bef3da0232b |
|
21-Dec-2011 |
Tor Norbye <tnorbye@google.com> |
Update SDK codebase to JDK 6 This changeset makes the SDK codebase compile with source=1.6 (which means it also requires JDK 6). This means that methods implementing an interface requires @Override's. It also means we can start using APIs like the ArrayDeque class and methods like String#isEmpty(). This changeset looks big but the change is trivial: it's basically adding @Override in all the places that need it, along with some other automatic Eclipse cleanup in certain files (such as reordering imports where they were incorrectly ordered (because older versions of Eclipse didn't always handle inner classes right)), as well as cleaning up trailing whitespace and removing some $NON-NLS-1$ markers on lines where there aren't any string literals anymore. This changeset also sets the source and target JDK level to 6 in the Eclipse compiler .settings file, and synchronizes this file to all the other Eclipse SDK projects. Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
|
a0bccbddc52575255c5ce19c9d2c96d9639d26ca |
|
16-Aug-2011 |
Tor Norbye <tnorbye@google.com> |
Pull View Rules API into a separate library This changeset pulls out the API classes from the plugin sources and into a separate standalone .jar library. The library depends on the common.jar library. With the separate view API it should be possible to build designtime helpers (view rules) for custom views to improve editing behavior in the layout editor. Change-Id: I20bb511668de2fe52910e5fe0bbd3ec2a18b5a08
|
8c3f16ae7d66cedf70c494de3a38a54e90f2a54e |
|
10-Jun-2011 |
Tor Norbye <tnorbye@google.com> |
Merge 0b95acc1 from master to r12. do not merge. RelativeLayout: Assign ids dynamically, handle multi-drag, bugs This CL fixes three issues with the new relative layout interaction: (1) Assign ids dynamically. Before this changeset you couldn't attach to a node which does not have an @id attribute, since layout params need to name the constraint by id. This changeset changes this such that you can attach to any arbitrary edge, and when you commit the drag, a unique id is generated on the fly and assigned to the node. (2) Handle dragging multiple nodes at the same time. The new constraints code was unconditionally applying the same constraints to all the dragged nodes, which meant they ended up on top of each other. This fixes things such that the first node is assigned the new constraints, and then all subsequent nodes are attached one next to the other, in a direction depending on which edge you attached to (e.g. attaching on the right will arrange the siblings towards the left out from the edge.) (3) Fix a bug in the code to detect and prevent cycles. Change-Id: I3da16903ffac6c34a0d5efee52a87824fb9e04fb
|
0b95acc1693f67140e988567211c13ca2eb9f926 |
|
10-Jun-2011 |
Tor Norbye <tnorbye@google.com> |
RelativeLayout: Assign ids dynamically, handle multi-drag, bugs This CL fixes three issues with the new relative layout interaction: (1) Assign ids dynamically. Before this changeset you couldn't attach to a node which does not have an @id attribute, since layout params need to name the constraint by id. This changeset changes this such that you can attach to any arbitrary edge, and when you commit the drag, a unique id is generated on the fly and assigned to the node. (2) Handle dragging multiple nodes at the same time. The new constraints code was unconditionally applying the same constraints to all the dragged nodes, which meant they ended up on top of each other. This fixes things such that the first node is assigned the new constraints, and then all subsequent nodes are attached one next to the other, in a direction depending on which edge you attached to (e.g. attaching on the right will arrange the siblings towards the left out from the edge.) (3) Fix a bug in the code to detect and prevent cycles. Change-Id: I157d45e117d3229f285870517b85ed902607b966
|
80d9301c2e874b29889c41adb0623666cf534fa0 |
|
10-Apr-2011 |
Tor Norbye <tnorbye@google.com> |
Resize & Guideline Support RelativeLayout now has both drop/move and resize guidelines, and existing constraints are visualized for the selection. LinearLayout resizing now uses weights to change the size of nodes rather than setting width/height. All resize operations offer guidelines to snap to their "wrap_content" size. Various bug fixes in related areas as well. Change-Id: I817e34c6e67ce61cfb137eb067076d91f69f99e9
|