summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/create/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix delegation of methods within inner static classesDiego Perez2015-11-133-0/+98
| | | | | | | | | Currently, delegation of inner static classes methods is broken since the rewritten method tries to pass an instance to the outer class. This updates the method generation to only pass the reference if the inner class is not static. Change-Id: I8493929cafdbd80968989b422af0f956fa65681a
* LayoutLib: Switch SimpleDateFormat to icu.Deepanshu Gupta2015-08-061-0/+20
| | | | | | | | | | | | Use ICU's implementation of SimpleDateFormat in LayoutLib. The format patterns used are not supported by java.text.SimpleDateFormat. The change required adding a mechanism for promoting visibility of fields in the framework in the create tool. TODO: Add additional tests in the create tool for this new functionality. Change-Id: Id0f4be41f9731c42a28919c32cc5ef271a656982
* Make Context.getClassLoader() work.Deepanshu Gupta2015-05-191-0/+133
| | | | | | | | | | | | | | | | | | | | | 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
* am 4f133894: Exclude KXmlParser from LayoutLib.Deepanshu Gupta2014-10-081-0/+86
|\ | | | | | | | | * commit '4f133894a6e98d8d30557ea42cec92cfb21fa5c9': Exclude KXmlParser from LayoutLib.
| * Exclude KXmlParser from LayoutLib.Deepanshu Gupta2014-10-081-0/+86
| | | | | | | | | | | | The class was incorrectly being included in the LayoutLib. Change-Id: I3c86662efa068019fe9165f2fc49a00d0a1b7f2d
| * Add layoutlib tests to DIST_DIR [DO NOT MERGE]Deepanshu Gupta2014-10-011-0/+3
| | | | | | | | | | | | | | | | Add the layoutlib and layoutlib-create tests to DIST_DIR for sdk targets. These can be used for continuous testing on the build server. Change-Id: I747dddcddfd8009937668bec4d75cb99bf63235f (cherry picked from commit f9c749c9901c459f77ffc6f4fbbc15f4142c6e0a)
| * Build layoutlib_create tests. [DO NOT MERGE]Deepanshu Gupta2014-10-011-0/+32
| | | | | | | | | | Change-Id: Ia13a090f8ec29b2b2a107825b6a13d7db77e6d61 (cherry picked from commit 2294f939bc79ce902a40db37def64cc28394d56b)
| * Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]Deepanshu Gupta2014-04-234-4/+32
| | | | | | | | | | | | | | | | The bug caused some classes to be missed when computing the dependencies of the existing classes. Change-Id: I7285ff67e016ce5d73a8550501f49acc73cfadfa (cherry-picked from 4a0f93bd32b8dd9b3c351680ad82e461d5111f38)
* | Add layoutlib tests to DIST_DIRDeepanshu Gupta2014-09-051-0/+3
| | | | | | | | | | | | | | Add the layoutlib and layoutlib-create tests to DIST_DIR for sdk targets. These can be used for continuous testing on the build server. Change-Id: I747dddcddfd8009937668bec4d75cb99bf63235f
* | Build layoutlib_create tests.Deepanshu Gupta2014-09-031-0/+32
| | | | | | | | Change-Id: Ia13a090f8ec29b2b2a107825b6a13d7db77e6d61
* | Fix LayoutLib Create tests.Deepanshu Gupta2014-08-041-16/+34
| | | | | | | | Change-Id: Ica3efe417d54da7dc74b21d28215199d37600744
* | Style improvements to LayoutLib create.Deepanshu Gupta2014-07-111-20/+18
| | | | | | | | | | | | | | This change doesn't change the functionality but removes dead code and simplifies various places to remove warnings. Change-Id: I371e06bfbd587dbf0eeafc69787b9805f7008f62
* | Fix visitFieldInsn in layoutlib_create.Deepanshu Gupta2014-03-314-4/+32
|/ | | | | | | The bug caused some classes to be missed when computing the dependencies of the existing classes. Change-Id: I7285ff67e016ce5d73a8550501f49acc73cfadfa
* Add missing files to fix libphonenumber for layoutlib.Deepanshu Gupta2014-01-175-13/+51
| | | | Change-Id: I8102da6c1c4625e887293a8823770d199521c53f
* Layoutlib Create: Remove references to non-std Java classes.Deepanshu Gupta2013-10-1612-33/+280
| | | | | | | | | | Do not add the non-standard Java classes. Updates the references to all non-standard classes to new classes in com.android.tools.layoulib.create package. This also treats java.lang.AutoCloseable which is part of Java 7 similarly so that we can still run on Java 6. Change-Id: Iac5b272652e2780c9bb72d19f415d150948ca589
* Make Layoutlib compile on Java 6.Xavier Ducrohet2012-02-021-0/+6
| | | | Change-Id: Ic8f0e321c6c218de83664fc01f253a07fa80852c
* Laoutlib_creator: keep original of delegate methods.Raphael Moll2011-06-173-3/+66
| | | | | | | | | | | | | | | | | | | For specific methods, Layoublib_create can rewrite the implementation of a method to invoke a delegate instead of the original code. This allows layoutlib to implement native code or override existing behavior. This patch also 'saves' the original implementation of a rewritten method so that the delegate can access the original implementation as needed. Obviously this is only done for non-native methods. Given a non-native SomeClass.MethodName, we generate 2 methods: - A copy of the original method named "SomeClass.MethodName_original". The content is the original method as-is from the reader. - A brand new implementation of SomeClass.MethodName which calls to a non-existing method named "SomeClass_delegate.MethodName". The implementation of this 'delegate' method is done in layoutlib_brigde. Change-Id: I5ca2cd3ac55991a8e8a51c417e75ee447bf9e9e6
* LayoutLib: Original import of Honeycomb's layoutlib. do not merge.Xavier Ducrohet2011-02-2311-52/+790
| | | | | | frameworks/base.git @ f0a53435f14d23d9555fc46014352ee6a7baa647 Change-Id: Ibc215751693dc7650683b61bb458f7c8beaf8060
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0311-0/+763
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0311-763/+0
|
* Initial ContributionThe Android Open Source Project2008-10-2111-0/+763