summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib
Commit message (Collapse)AuthorAgeFilesLines
* LayoutLib: Skip classes from java package.Deepanshu Gupta2015-06-011-1/+3
| | | | | | | Classes in "java" package can't be defined at runtime anyway. No use including them in LayoutLib. Change-Id: I7e7c46f0d74e32c893b23093828569b4fa5e3a73
* Skip warnings for some unresolved references.Deepanshu Gupta2015-06-011-0/+41
| | | | | | | | | | | | | | | Some applications rename the newer RTL attributes to the older attributes in order to target RTL locales, but not need to include two attributes everywhere it's needed. For example, iosched renames paddingStart to paddingLeft (among other attributes) for API 17 and above. This leads to hundreds of warnings about missing attributes. This change suppresses such warnings. Also, skip adding unresolved attributes to the typed array. This is more in line with the actual implementation on device, and prevents unexpected warnings/errors/crashes later. Change-Id: Iee616fa6295aa9731ede0cf9dcd6dd2bd1fe8f20
* Merge "Revert "Revert "Fix build.""" into mnc-devFilip Gruszczynski2015-06-011-1/+1
|\
| * Revert "Revert "Fix build.""Filip Gruszczynski2015-06-011-1/+1
| | | | | | | | | | | | This reverts commit 944a6c937cd3576ecae5c3fdd0dcf265329e6bcf. Change-Id: I7daa255f331a1e39308eb626580aa00c63c5cb3e
* | Merge "Revert "Revert "resolved conflicts for merge of 47249f2a to ↵Filip Gruszczynski2015-06-011-2/+2
|\ \ | | | | | | | | | mnc-dev""" into mnc-dev
| * | Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""Filip Gruszczynski2015-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes the fix for the broken dialog windows. The outsets will only be calculated and applied if the window is full screen, since they don't make much sense otherwise. This reverts commit 4bb6b751fbbb218e8a298db4aa008472a0aa8d31. Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
* | | Fix ParserFactory not initialized error.Deepanshu Gupta2015-05-301-3/+3
| | | | | | | | | | | | | | | Bug: http://b.android.com/175129 Change-Id: I2111673767e0f62ee910560022b559a177d55abd
* | | Fix NPE in BridgeContext.obtainStyledAttributes()Deepanshu Gupta2015-05-281-1/+2
| | | | | | | | | | | | | | | | | | Replace direct member access with getter that checks for nullness. Change-Id: I4a56a0ee903ae7d8c89b91d74b128302e1965586
* | | Fix BridgeTypedArray.getType()Deepanshu Gupta2015-05-281-8/+114
|/ / | | | | | | | | | | | | | | Also includes some fixes for BridgeTypedArray.getInt() - when value is a color, when value is an octal int, when value is true/false. Bug: http://b.android.com/162438 Change-Id: I0b985ea3437be8018d0e116e7a599843cc7aacd6
* | Merge "Include Shapes in LayoutLib." into mnc-devDeepanshu Gupta2015-05-261-3/+1
|\ \
| * | Include Shapes in LayoutLib.Deepanshu Gupta2015-05-261-3/+1
| | | | | | | | | | | | Change-Id: Ifb32882c478f8d407ad904e224b67fe2bd65dc08
* | | Merge "LayoutLib: Support getting resource arrays." into mnc-devDeepanshu Gupta2015-05-2622-14/+245
|\ \ \
| * | | LayoutLib: Support getting resource arrays.Deepanshu Gupta2015-05-2622-14/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't crash when Resources.get<Type>Array() is called. - If the IDE supports it, actually return the value. - Add tests for getArray. - Update test app to latest gradle plugin version. - Switch to using AppTheme for tests, since the tests depend on some custom theme attributes. The AppTheme now inherits from Material.Light.DarkActionBar, so other tests should be unaffected. Depends on a newer version of sdk-common, which fixes the parsing of array resource in value files. Bug: 12372031 Change-Id: I313b61511e98ac1402d75056ebfdeeb005ebb96d
* | | | Merge "LayoutLib: Change nullity annotations." into mnc-devDeepanshu Gupta2015-05-2636-53/+57
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | LayoutLib: Change nullity annotations.Deepanshu Gupta2015-05-2236-53/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch from using tools nullity annotations (com.android.annotations) to android framework annotations (android.annotation). A new sdk-common prebuilt is required for LayoutLib tests. The new sdk-common requires an updated tools-common. The updated tools-common doesn't have nullity annotations. So, instead of adding the annotation dependency, just reuse the platform ones. This also paves the way to include other platform annotations like IdRes etc. Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
* | | Merge "Revert "Fix build."" into mnc-devDeepanshu Gupta2015-05-231-1/+1
|\ \ \ | |/ / |/| / | |/
| * Revert "Fix build."Deepanshu Gupta2015-05-231-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 97b3ae1a8766616675ebf2323a97d8adfd41bfdc. Reverted since 4bb6b751fbbb218e8a298db4aa008472a0aa8d31 reverts the commit that warranted this change. Change-Id: I56d0eb8ffba44a673ae357e9543dd18f6c03c54f
* | Revert "resolved conflicts for merge of 47249f2a to mnc-dev"Dianne Hackborn2015-05-221-2/+2
|/ | | | | This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
* Fix build.Filip Gruszczynski2015-05-221-1/+1
| | | | | | | Cherry picking because automerger is stuck. Change-Id: I49f669ee8eed53cf2fc30077cf0a066312865733 (cherry picked from commit c1b736a0cdf41ab5863bfe6901e46c95cc396342)
* Merge "resolved conflicts for merge of 47249f2a to mnc-dev" into mnc-devFilip Gruszczynski2015-05-221-2/+2
|\
| * resolved conflicts for merge of 47249f2a to mnc-devFilip Gruszczynski2015-05-201-2/+2
| |\ | | | | | | | | | | | | | | | This is a merge of chin support. Change-Id: I436b751b3c4aaa6b46cfcdb475e02eedfa5a5635
| | * am cb89ac84: Merge "Support for devices with a chin." into cw-d-mr1-devFilip Gruszczynski2015-05-201-2/+2
| | |\ | | | | | | | | | | | | | | | | * commit 'cb89ac84c621e047d81873428325dfd747b90a6b': Support for devices with a chin.
| | | * Support for devices with a chin.Filip Gruszczynski2015-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Information about the chin is now part of the config.xml instead of the theme. It is retrieved by WindowManagerService and passed to the clients as insets. Clients can adjust their behavior in a way that makes it invisible to the user, that part of the surface doesn't actually exist. Bug: 19908853 Change-Id: Iedf57bf3c848201b854f91ffeb3b59187d375c1f
* | | | Add LayoutLibDelegate for new Bitmap method.Deepanshu Gupta2015-05-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Original method added in: 721ae5fec5f1fd4f93aa2a361a0ac298e15ce353 Change-Id: Ie14d132459638cf103c390fae3f4c0c02bef2f34
* | | | Add documentation about hack in commit: f8ea750455Deepanshu Gupta2015-05-211-0/+14
|/ / / | | | | | | | | | Change-Id: I9ce871a67fb67e02e0c4df1eb5c3261ea52a914b
* | | Fix overrides for BridgeResources.Deepanshu Gupta2015-05-201-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | New method overloads have been introduces in android.content.Resources. Change BridgeResources to overrides the appropriate ones. Also, fix the implementation to the new behaviour. Change-Id: I7b83b329f04286512f223c0fafc3f989f1b9a244
* | | Make DatePicker rendering not fail.Deepanshu Gupta2015-05-203-26/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensures that having a DatePicker in the layout doesn't crash the complete rendering. The rendering is still not perfect, but at least it works. - Return a non-null window token so that ViewPager thinks that it's attached to a window and doesn't skip populating the views. - Fix a style not found issue. Change-Id: Ied2b71de5b32bcb640bf4ec445e8a39509f800e9
* | | Use non deprecated method for creating ColorStateListDeepanshu Gupta2015-05-201-1/+2
| | | | | | | | | | | | Change-Id: I9fce928276c8a2af55eb0615a4895abb6a973be5
* | | Fix line breaking.Deepanshu Gupta2015-05-201-47/+36
| | | | | | | | | | | | | | | | | | | | | Essentially moves line breaking measurement later in the process when character widths have already been computed. Change-Id: I17c5bc10d373d8906c5caf86604ce8504650cd7f
* | | Merge "Inject anonymous inner classes of injected classes" into mnc-devDeepanshu Gupta2015-05-204-11/+32
|\ \ \
| * | | Inject anonymous inner classes of injected classesDeepanshu Gupta2015-05-204-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When injecting classes in LayoutLib (eg. CreateInfo), so that LayoutLib can refer back to the changes, also inject the anonymous inner classes. Without this, the injected classes are not loadable. Although, LayoutLib itself doesn't load these classes, but some tests do. Change-Id: Ib5f6b779ef4d79dec8d614d3dbb26eeac88a1064
* | | | Merge "Update platformDir search in tests." into mnc-devDeepanshu Gupta2015-05-201-2/+7
|\ \ \ \ | |/ / /
| * | | Update platformDir search in tests.Deepanshu Gupta2015-05-201-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to find the SDK Platform Dir for LayoutLib tests, also test if the dir from which the tests are run is module dir. Change-Id: Id5c6038d07ebbb122e38f907ad488ed1f2bcde32
* | | | Merge "Make Context.getClassLoader() work." into mnc-devDeepanshu Gupta2015-05-2011-31/+347
|\ \ \ \ | |/ / /
| * | | Make Context.getClassLoader() work.Deepanshu Gupta2015-05-1911-31/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context.getClassLoader() is used by the LayoutInflater and can be used by custom views. However, when called from the LayoutInflater, this needs to return only the Framework classes. This is so that the IDE gets a chance to instantiate the custom views, which helps in better error reporting and better fallback in case of exceptions, like MockView. To workaround this need of the same method returning different results based on where it's called from, the method call in LayoutInflater is renamed to getFrameworkClassLoader() and the new method is injected in Context. The implementation of getFrameworkClassLoader() maintains the existing behaviour of getClassLoader(). Context.getClassLoader() is now modified to return classes from both Framework and the app namespace. Also, update the list of packages to search for Framework views. Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b
* | | | Merge "Fix include tag rendering." into mnc-devDeepanshu Gupta2015-05-192-6/+11
|\ \ \ \ | |/ / /
| * | | Fix include tag rendering.Deepanshu Gupta2015-05-192-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A missing catch clause caused rendering to be failed when there is an include tag that doesn't specify layout_width and layout_height. Also improve the error messages to make debugging easier next time. Change-Id: I617762636973a010b34da167c7b5fcd328b7d178
* | | | Merge "Show better error message for color attr not found." into mnc-devDeepanshu Gupta2015-05-181-0/+5
|\ \ \ \ | |/ / /
| * | | Show better error message for color attr not found.Deepanshu Gupta2015-05-181-0/+5
| | | | | | | | | | | | | | | | Change-Id: I1ca32989522d30fec336eb607ee81f9e5cb5f48f
* | | | Fix nav bar spacing for tablets.Deepanshu Gupta2015-05-183-21/+99
|/ / / | | | | | | | | | Change-Id: Ieee2c2174a3041a0f967cc75bbe74d8bf882ced7
* | | Fix build: udpate parser factory methodDeepanshu Gupta2015-05-141-2/+11
| | | | | | | | | | | | Change-Id: I78ad55bc924427b44451ec32fbd1032d6cd77544
* | | Don't keep LayoutlibCallback reference.Deepanshu Gupta2015-05-143-84/+12
| | | | | | | | | | | | | | | | | | | | | | | | Switch to the newer API that enables keeping a reference only to the ParserFactory which is a much leaner object as compared to LayoutlibCallback. Change-Id: I9b7afd93226db23786a00b2951cbf5ae5b8f3e5f
* | | Move couple of intellij libraries to project level.Deepanshu Gupta2015-05-143-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | Move framework and layoutlib api libraries back to being project libraries so that other modules can depend on it. This enables custom widget libraries project to merge through cleanly. Change-Id: I4f00d6fb378a80662f32491a2b0061d6bf61899f
* | | Fix build.Deepanshu Gupta2015-05-132-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | When doing the full build, javalib.jar wasn't created. However, mm had created the javalib.jar. Fix the build by not depending on javalib.jar, but on classes.jar Change-Id: I643676b1d73cbfce42946a065a2ada6c50cc959a
* | | Update rendering fidelity tag to use constant.Deepanshu Gupta2015-05-131-4/+4
| | | | | | | | | | | | Change-Id: If6c1076aa1e070c6bda7be16516fe0e18a95fe2d
* | | Use Balanced line breaker instead of HighQuality.Deepanshu Gupta2015-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Fallback to the Balanced line breaker till the time HighQuality one is implemented. Change-Id: I51e9882c5c733e5409f932ef740684829340ced9
* | | Update nav bar icons.Deepanshu Gupta2015-05-1324-14/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a script to copy the icons from the original source. - Update layout used for the navigation bar to be closer to the original layout. - Update test image with the latest rendering. - Add a nexus 5 landscape device config to help with testing. Change-Id: I0b6674955e0970a6a8cce148b1b7aa61e1752ccd
* | | Load ICU data in LayoutLibDeepanshu Gupta2015-05-134-6/+19
| | | | | | | | | | | | | | | | | | Also return the correct version numbers for ICU data. Change-Id: I7de973b5553c73948870b97bdc12a880bb2fdd85
* | | Add missing delegates for M preview.Deepanshu Gupta2015-05-1336-376/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove ICU dependency (use the version bundled with platform). - Restructure intelliJ project to move dependencies to module. - Minor fixes to layoutlib tests. TODO: - Load ICU data. - Hyphenator doesn't work. - High quality line breaker not present. Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
* | | Run setup for full tests only once.Deepanshu Gupta2015-05-131-26/+36
| | | | | | | | | | | | Change-Id: Iee64dbd88d473b7be08581f26ccddf649aed8e56