summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android/view
Commit message (Collapse)AuthorAgeFilesLines
* Improve error reporting on Exceptions in fw views.Deepanshu Gupta2015-11-121-16/+27
| | | | | | | | | | | | | | When there's an exception during the inflation of a framework view (for example invalid attributes), report the exception correctly. The earlier behaviour assumed the exception to be a ClassNotFoundException and tried to load it from the user's project. This is not longer the case. Also, update the MockView class to a FrameLayout with a single TextView. This means that the MockView is a ViewGroup and will not choke when someone attempts to add a View to it (although, the view will be silently dropped). Change-Id: Ice003817ceb627ebfbbbb245ab6be10f9141e728
* Support databinding in listitem layouts.Deepanshu Gupta2015-09-291-1/+1
| | | | | | | | Add a wrapper around the PullParser to support stripping out databinding parts. Bug: http://b.android.com/187428 Change-Id: I88080d8f4108cb5ae27a137ad20c5dd7d516f3ea
* Fix android:theme parsing for custom views.Deepanshu Gupta2015-08-281-2/+20
| | | | Change-Id: Iba83ba1d2e4a96461cc298a759e32e4e51e311a0
* Add tools:openDrawer to open a DrawerLayout.Deepanshu Gupta2015-07-151-0/+36
| | | | | | | Store a list of drawer layouts with tools:openDrawer encountered and call openDrawer on them during the post-inflation processing. Change-Id: Idee299a9af1bb106509a03bb2e8424c372b93dc5
* Implement tools:list_item for RecyclerView.Deepanshu Gupta2015-07-071-8/+23
| | | | | | | It's now possible to use tools:list_item attribute for RecyclerView to point to a default layout, rather than always using a TextView. Change-Id: I5d522b2f0ca38b420fddfcb0f73a26d95707da79
* resolved conflicts for merge of 5a53816b to mnc-devDiego Perez2015-06-151-3/+7
|\ | | | | | | Change-Id: Ice1ba8cb9793432e18635e77f4e3309f50bb7b3f
| * Fix crash when shadowSize is 0Diego Perez2015-05-081-2/+9
| | | | | | | | | | Change-Id: I9f131afc95a2571fbc8a737df37f43653cfbb90d (cherry picked from commit e81096458f689ab3c0c4dbab2452722c3e3623c4)
* | Support AppBar from Material Design.Jens Ole Lauridsen2015-06-111-0/+8
| | | | | | | | | | | | | | This CL is a start for making the design able to render the AppBar. We are still missing support for: system menu and the app icon. Change-Id: I19600f8ee1e7e6492186a0b7ae7fb38c82e15c02
* | LayoutLib: Change nullity annotations.Deepanshu Gupta2015-05-222-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Make DatePicker rendering not fail.Deepanshu Gupta2015-05-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Make Context.getClassLoader() work.Deepanshu Gupta2015-05-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix include tag rendering.Deepanshu Gupta2015-05-191-1/+2
| | | | | | | | | | | | | | | | 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
* | resolved conflicts for merge of a663e012 to mnc-devDeepanshu Gupta2015-05-061-21/+1
|\ \ | |/ | | | | Change-Id: I279cad7db6e9b5e97da3ea3c3bb91e09cabc7076
| * Merge "RecyclerView in LayoutLib: better XML attrs." into lmp-mr1-devDeepanshu Gupta2015-05-061-21/+1
| |\
| | * RecyclerView in LayoutLib: better XML attrs.Deepanshu Gupta2015-04-161-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - RecyclerView now supports XML attributes natively. Thus, remove the custom support via tools attribute. Users with older versions of RecyclerView should update. - Add Context.getPackageName() support used by RecyclerView. - Update SessionParamsFlags with the new changes and rename it to RenderParamsFlags. The attribute behaves slightly different from the original tools attribute. For usage, see commit 044b5b61e96 in frameworks/support. Change-Id: I12073e37a2ba411558ca1d3e30c399e3d9a0b144
* | | am 88b193d7: am 047a28ec: am 96437fb4: am 9aa600e7: Merge "LayoutLib: fix ↵Deepanshu Gupta2015-05-071-0/+15
|\ \ \ | |/ / | | | | | | | | | | | | | | | crash when shadow size <=0." into lmp-mr1-dev * commit '88b193d717bb73cbe555e4e621f7b6efdf49cdaa': LayoutLib: fix crash when shadow size <=0.
| * | LayoutLib: fix crash when shadow size <=0.Deepanshu Gupta2015-05-011-0/+15
| |/ | | | | | | | | | | | | | | Drawing empty rects results in IllegalArgumentException on Mac JRE 1.6. Prevent that by checking the bounds before attempting to draw the rect. Bug: 20687353 Change-Id: I45f48ee125196480bb6510cc49b24d2122bc3e48
* | Fix layoutlib build breakageAlan Viverette2015-04-301-17/+11
| | | | | | | | Change-Id: Id3a9b79ac47ef27b04a96ff3ee50688bbb58f9c0
* | Fix view outline for shadows in LayoutLib.Deepanshu Gupta2015-04-271-8/+4
| | | | | | | | | | | | | | | | Set the bounds on the drawable before getting the view outline for shadow. Also, reuse the temp outline object in AttachInfo rather than allocating a new one each time. Change-Id: I69793d38d60c5b9f9050569f2b22fbc7b90620bf
* | Merge "Add support for disabling display scaling for development."Jeff Brown2015-04-161-0/+4
|\ \
| * | Add support for disabling display scaling for development.Jeff Brown2015-04-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added two new options to the wm command. 1. Set the screen size based on dips rather than pixels using the current screen density. eg. adb shell wm size 320dpx320dp 2. Disable automatic scaling of the contents of the display. When combined with the previous command, this is useful for seeing how the UI would behave if the screen remained at its current density but changed physical size. eg. adb shell wm scaling off Bug: 19899223 Change-Id: I545f893ba4861494e995cf0457ebeba1050d28dc
* | | resolved conflicts for merge of 186fe7b1 to masterDeepanshu Gupta2015-04-161-11/+12
|\ \ \ | |/ / |/| / | |/ Change-Id: I60886d3e44ae23a11c8f129517df87ee29625ada
| * Update to using LayoutlibCallback.Deepanshu Gupta2015-04-151-11/+12
| | | | | | | | Change-Id: Ia89d418b0d40ca8efef8968a4a2a635616b945ac
* | Save search context when dispatching onSearchRequested.Tim Kilbourn2015-04-131-0/+5
| | | | | | | | | | | | | | | | | | The InputDevice used to trigger the search is saved in a SearchEvent so an application implementing onSearchRequested determine the device triggering the search. Bug: 15374820 Change-Id: If2cd14f77ce572a5ee131697cd63145fbea63f27
* | am eb96b231: am 25557e0a: am 5f0252de: am 6fa9d554: am 0b76cf6f: am ↵Deepanshu Gupta2015-03-252-69/+177
|\ \ | |/ | | | | | | | | | | 34751c79: Merge "Better shadows." into lmp-dev * commit 'eb96b231b2755d50db4f931cc11203fd32a90820': Better shadows.
| * am 0b76cf6f: am 34751c79: Merge "Better shadows." into lmp-devDeepanshu Gupta2015-03-252-69/+177
| |\ | | | | | | | | | | | | * commit '0b76cf6ff56c59a04783714d40163576e3081cf1': Better shadows.
| | * Better shadows.Deepanshu Gupta2015-03-242-69/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | Better shadows for rectangles and rounded rectangles (includes circles). The shadow painting code is mostly from CardView library, but modified heavily since CardView needs to draw the shadow inside view bounds. Change-Id: I88c9f19b1c16839b8d6db6df2bebff126fa5a9a3
* | | Correctly apply android:theme attribute from <include> tagAlan Viverette2015-03-202-51/+84
| | | | | | | | | | | | | | | Bug: 19865544 Change-Id: I6b50fa9f28a9d7f1685f9f55e505c630c12c53a2
* | | Fix build.Dianne Hackborn2015-03-171-2/+10
| | | | | | | | | | | | Change-Id: I6797bb2b5c85961c3bcb3fa8950bae121232f592
* | | am 199a70f1: am 576801ff: am 842eee9f: am 1f9a26af: am 158c08bc: am ↵Deepanshu Gupta2015-03-173-13/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | ada85905: Fix AppCompat action bar theming. * commit '199a70f1820c38a9f1db1697ad91c4f5f07d00aa': Fix AppCompat action bar theming.
| * | am 158c08bc: am ada85905: Fix AppCompat action bar theming.Deepanshu Gupta2015-03-173-13/+12
| |\ \ | | |/ | | | | | | | | | * commit '158c08bcf1cd0bc702748ee2a4cf6aa259c26147': Fix AppCompat action bar theming.
| | * Fix AppCompat action bar theming.Deepanshu Gupta2015-03-163-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use themed context to inflate the action bar when AppCompat is used. Also fix minor issues exposed as a result. - Set project callback when LayoutInflater is created by LayoutInflater.from(context). - Remove duplication of code to get base context from context wrapper. Bug: http://b.android.com/159711 Change-Id: I379ba2ba71c0ef547460987c3aa5db521c7de967
* | | Add a type parameter to startActionMode() calls.Clara Bayarri2015-03-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires adding a new method to View and Window.Callback to pass down the type as a parameter. For compatibility purposes, the new method implementations keep the type and call the old method, in case clients have subclassed it. Change-Id: If5d857f131e33be8cc6a8814f2e9c4e85ad2da25
* | | am a4277e14: am a4ed5e94: am e770c5e4: am c44430a3: Merge "Tools attribute ↵Deepanshu Gupta2015-03-131-4/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | improvements for RecyclerView LayoutManager." into lmp-mr1-dev * commit 'a4277e149355c53fde73a4e1ef44aa665af31cf0': Tools attribute improvements for RecyclerView LayoutManager.
| * | Tools attribute improvements for RecyclerView LayoutManager.Deepanshu Gupta2015-03-111-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Change tools attribute for layout manager from layoutManagerType to LayoutManager. 2. Support classnames in the tools attribute. This change doesn't try to supprt arbitrary classnames for now. The reason for this is that the new layoutlib API is supposed to contain a new method for inflating custom classes that are not views. This will allow us to throw better error messages. Without the new API, trying for different constructors, will result in a error messages being logged. Change-Id: I3a31359c06b7452bfd973c3e5e54f9038acccfaa
* | | resolved conflicts for merge of ef1741d2 to masterAndreas Gampe2015-03-121-7/+23
|\ \ \ | |/ / | | | | | | Change-Id: I5379d5f756695f5176d92249ac6304bffcf95751
| * | Add RecyclerView support.Deepanshu Gupta2015-03-101-7/+23
| | | | | | | | | | | | | | | Bug: http://b.android.com/72117 Change-Id: Iba95baff59f1b715f91da25e15acf27bc052d95e
* | | Fix crash when shadowSize is 0Diego Perez2015-03-041-0/+3
| | | | | | | | | | | | Change-Id: I9f131afc95a2571fbc8a737df37f43653cfbb90d
* | | am 01d5286f: am 8f022fd3: am 5ed4fc9e: am 99142d29: am 3f8e2b93: am ↵Deepanshu Gupta2015-02-241-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | 30a67cd1: Merge "Set forceFramework correctly for included layouts." into lmp-dev * commit '01d5286f388303551a2eb8f57e210f6d7a690cb5': Set forceFramework correctly for included layouts.
| * | am 3f8e2b93: am 30a67cd1: Merge "Set forceFramework correctly for included ↵Deepanshu Gupta2015-02-231-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | layouts." into lmp-dev * commit '3f8e2b9302fba0ace67fb0459d6ffb0884c4d80b': Set forceFramework correctly for included layouts.
| | * Set forceFramework correctly for included layouts.Deepanshu Gupta2015-02-231-1/+1
| | | | | | | | | | | | | | | Bug: http://b.android.com/151326 Change-Id: I759f6e1a7a1c83bbbb771ddbb92843a105acffa4
* | | am a0fb87a3: am 98c3461a: Merge "Do not paint shadow if outside of the clip ↵Diego Perez2015-02-171-2/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | area" into lmp-dev automerge: a912fed automerge: d66f2eb automerge: 412e643 * commit '412e6439b2d372565f14cc1dce0ff25f106975af': Do not paint shadow if outside of the clip area
| * | am 98c3461a: Merge "Do not paint shadow if outside of the clip area" into ↵Diego Perez2015-02-171-2/+7
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | lmp-dev automerge: a912fed * commit 'a912fedbc5fba99fb75884a1941d58170822ceb4': Do not paint shadow if outside of the clip area
| | * Do not paint shadow if outside of the clip areaDiego Perez2015-02-041-2/+7
| | | | | | | | | | | | Change-Id: I064ccc1d1b206a29d9d0db1384782cb5dd5c65ca
* | | Add ClipReveal window transition for application launchChet Haase2015-02-131-0/+6
| | | | | | | | | | | | | | | | | | Issue #19362772 Better material launch animations Change-Id: Ic94fde910b6b5554ee954dfbbf374949f9eb189d
* | | Eliminate groupId and add task to AppWindowTokenCraig Mautner2015-01-271-1/+1
|/ / | | | | | | | | | | | | | | Simplifies access by eliminating indirect referencing. Fixes bug 18088522 item #15. Change-Id: I9049192a7f3e1028d60c4f2d4d4a0d4aad590aa4
* | am 3cf0640d: Merge "Add primitive shadows support to LayoutLib" into lmp-dev ↵Deepanshu Gupta2014-11-103-0/+692
|\ \ | |/ | | | | | | | | | | automerge: 97c04ac * commit '3cf0640d944a0718b9e29a2134a577e72a9432b4': Add primitive shadows support to LayoutLib
| * Add primitive shadows support to LayoutLibDeepanshu Gupta2014-11-073-0/+692
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shadows rendered are not the same as rendered by the framework. The main purpose of the shadows here is let the user know when shadows will be cast. Currently rectangular shadows are available in only two intensities. Any elevation below 10dp uses one shadow and any elevation over 10 dp uses the other. Also, even though the code for arbitrary shapes exist, it doesn't quite work yet. No shadows are visible when that code is run. Change-Id: Ie8235ffccf1d3809713f5d8f82afde434817d6b2
* | Adding bounce animation for affiliated tasks. (Bug 16656169)Winson Chung2014-11-061-0/+5
|/ | | | Change-Id: I39e4a57c4e6b707d15513dacde2d40c23bb05058
* Use the right layout for inflating Action Bar.Deepanshu Gupta2014-10-301-0/+131
| | | | | | | | The choice of Action Bar layout depends on the theme. This also affects the widget used to render the Action Bar. Bug: http://b.android.com/77853 Change-Id: I6219a02853b4cd207a6125a5ed96fa5d16699460