aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/com/android/resources
Commit message (Collapse)AuthorAgeFilesLines
* Refactor common.jarXavier Ducrohet2012-08-0715-1581/+0
| | | | | | | | | | | | | | | 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
* Add XXHigh density (added in JB)Xavier Ducrohet2012-07-101-0/+1
| | | | Change-Id: I09f308a3187d93abfda23c63ed72ba906b65ebc9
* Add info about when qualifiers were added to the platform.Xavier Ducrohet2012-03-161-7/+13
| | | | | | | | This is a first step where we setup the info. Next step is to actually use the info when calling ResourceRepository.getConfiguredResources Change-Id: I03c20ad0ec7a53ec8219316cc4af7a59155ef34a
* Extract positional XML parser into common and fix encoding issuesTor Norbye2012-01-0511-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | The XML DOM parser used by the lint CLI driver (which tracks positions) is needed outside of lint, so pull it out of the lint/cli project, and refactor it such that it does not directly reference the lint Position APIs (but can utilize them when subclassed in lint). In addition, handle non-UTF-8 file encodings. XML files can be encoded in other character sets, and can specify this via the encoding attribute in the XML prologue. Until now, the CLI lint runner would just read the XML file contents in using the default encoding and parse this. Now there's a new utility method which takes a byte[] and infers the desired encoding and uses that to convert the byte[] into a string using the correct encoding. (We can't just pass an InputStream and let the SAX parser handle this on its own because the XML parser needs to access the character stream in order to assign correct node offsets.) This code now also handles the byte order mark more cleanly. There are some new unit tests too to check the new encoding, BOM and offset handling. Change-Id: Ib0badbbe72172e3408c6d5af2413be51280a7724
* ADT Resource Repo stores IDs and Called OnceJosiah Gaskin2011-08-011-0/+2
| | | | | | | | | | | | | | | | | | This change makes ADT parse out @+id declarations from layout and menu files and store them in its ResourceRepository. This eliminates the need to merge in IDs from the generated R.java in order to have a complete repository of resources. In order to do this, a new type of ResourceFile is created: IdGeneratingResourceFile which is used for xml files in menu/ and layout/. Also includes an IdResourceParser which finds all the declared IDs in an XML. This change also includes a change to the ResourceMananger to process raw deltas that can be provided either from the PreCompilerBuilder or from the GlobalProjectManager. This is to avoid duplicate deltas being passed to ResourceManager when autobuilding. Change-Id: I1c705a5f5a01ce7daa3eb76f14bd6cb9e11b5248
* Revert ScreenLayoutSize to ScreenSize.Xavier Ducrohet2011-06-091-8/+8
| | | | | | | | | | | | I hadn't noticed that LayoutLib actually uses ScrenSize through the tools-common-prebuilt.jar, so this API is (somewhat*) frozen. * Somewhat because LayoutLib.jar actually only uses Density and ScreenSize but not the other enums (yet?) so the rename of DockMode is not a problem. Change-Id: Ida3360b0111abd96d2a27c16833b282706774fb6
* Renamed some resource enum/qualifiers to be more consistent with the platform.Xavier Ducrohet2011-06-092-20/+20
| | | | Change-Id: I9c5ea5183e115582e0b805ca3ec75aad70e4a65c
* Add support for the new width/height resource qualifiers.Xavier Ducrohet2011-06-091-1/+2
| | | | | | Also add Television to the dock mode (which is really UI Mode). Change-Id: I97e3fbea1806a32d8267d8e462211add2b122ed0
* Add support for the TV dpi.Xavier Ducrohet2011-06-031-0/+1
| | | | Change-Id: I97fedc69644d83801b50d7882bb759db7089d8f0
* Move FolderTypeRelationship to common.jarXavier Ducrohet2011-02-251-0/+164
| | | | Change-Id: I3a151d2fadd1c1e34177cb729fe5545fa754849a
* Move ResourceFolderType into common.Xavier Ducrohet2011-02-242-2/+80
| | | | | | | Moved some constants from sdklib (which is not a dependency of common but instead depends on common) into common. Change-Id: I6fdfbad4e77813a9f2a2ca9ea0d740692d8bce5b
* Add MipMap to the resource type list.Xavier Ducrohet2011-01-281-0/+1
| | | | Change-Id: I1f56ab470874e39dad8659d15a3699b83f1ac658
* Move Pair and annoatations into resources.jar now renamed as common.jarXavier Ducrohet2011-01-2813-0/+1272
Move all the resource query methods that returned an array of 2 Strings to return a pair of ResourceType and String. Change-Id: I6b8447aa27005de786e2defef81ad88a72363523