summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* LayoutLib: When possible ensure parsers are popped from the stack.Xavier Ducrohet2011-02-145-21/+46
| | | | | | | | | | | | | | | | Some parser consumers (seems to be mostly resource inflation) don't use the pull parser up to the END_DOCUMENT tag, making the parser not pop itself from the parser stack automatically. This is likely due to the XML resources being very shallow (1-2 levels max), and the inflater just reading the content that it expects instead of parsing till the document is done. This ensures that *some* parsers are pop'ed from the stack when used. Some other parsers we don't really control and hope the user will parse till END_DOCUMENT. Change-Id: Ie1f5762983fed2b2ae97b896218ae12b493e7ad9
* LayoutLib: fix the background of title/action bars.Xavier Ducrohet2011-02-074-13/+30
| | | | | | | | | | | | | The bars are supposed to sit on top of the window so that if they are transparent (which is the default case for the action bar), the window background shows through. Fix this using a layout to represent the window content (all but the system bar) in which the title/action bars and the layout content sits. This layout receives the windowBackground drawable. Change-Id: I8072c5ff52f585fa32acb589d8526e1c13cbcd94
* LayoutLib: Update to latest API fix.Xavier Ducrohet2011-02-071-1/+1
| | | | Change-Id: I5147010e4f16a5c2ea0b98709c42f7ecd9412ff6
* Merge "LayoutLib: Handle color state list in methods returning an int." into ↵Xavier Ducrohet2011-02-071-7/+4
|\ | | | | | | honeycomb
| * LayoutLib: Handle color state list in methods returning an int.Xavier Ducrohet2011-02-061-7/+4
| | | | | | | | Change-Id: Ia35ea09b992a239873026c7ef1629a01dd2e6cec
* | LayoutLib: improved rendering for system/title/action bars.Xavier Ducrohet2011-02-0614-131/+251
| | | | | | | | Change-Id: I926531e9ad4a7b98e04e23cac3837794f7c89449
* | LayoutLib: add implementation of Bridge.renderDrawable()Xavier Ducrohet2011-02-043-6/+178
|/ | | | Change-Id: Ic4d96488fd1a2e5b7d24353bebc8fdb24262c1d1
* LayoutLib: split RenderSession's base method into RenderAction.Xavier Ducrohet2011-02-043-244/+348
| | | | | | This will allow us to create RenderDrawable that extends RenderAction. Change-Id: If9cd350453ceffae4859a925a7b436502b311f9c
* LayoutLib: update to the new API.Xavier Ducrohet2011-02-042-7/+8
| | | | Change-Id: Ice028933cd2270c81c3d17f7bef7c5a9d14bd802
* LayoutLib: Replace custom BitmapFactory by a simpler delegateXavier Ducrohet2011-02-045-606/+136
| | | | Change-Id: Ie61a0a5b4426e64bb71a22d76d05efa4c0865e5e
* LayoutLib: render system/title/action bars.Xavier Ducrohet2011-02-0421-201/+770
| | | | | | | Also a few generic fixes in the layoutlib itself to support this. Change-Id: Ie3f24c9056bd3cc72f39f8a4f2c0861be15bff55
* LayoutLib: Fix some rendering issuesXavier Ducrohet2011-02-022-5/+9
| | | | Change-Id: I662a39a783de5bc7f3063f46cedaab11c7e6496e
* Make TimePicker/DatePicker/CalendarView render in Eclipse.Xavier Ducrohet2011-02-026-7/+290
| | | | Change-Id: Id5313a6f0f53bf45f6eaabc0e10fcf0660eeac08
* LayoutLib.Create: support Outer_Inner_Delegate renaming.Raphael2011-01-317-115/+446
| | | | | | | | | | When generating delegates, LayoutLib.Create support renaming inner classes. Only one level of inner class is supported. The method Outer$Inner#get(...) generates a call to: static Outer_Inner_Delegate#get(Outer instance, Outer$Inner instance, ...) Change-Id: Ie70f2b8e5e5f311ed9c7f26b7f64637ae6157a51
* LayoutLib: update with Pair API.Xavier Ducrohet2011-01-2810-83/+82
| | | | Change-Id: Iba945153f7544872ea84e3311584223aea740e2e
* LayoutLib: Update with the new resource map APIs.Xavier Ducrohet2011-01-2810-32/+50
| | | | Change-Id: I30d83c2bb4569513f4f5e22670cffe938706f105
* LayoutLib: Properly compute available space to layouts.Xavier Ducrohet2011-01-278-81/+228
| | | | | | | Also display placeholders for status/title/action bars depending on if the app is a tablet and its theme. Change-Id: I651c1a2e5cfde165e004c11b236e6df056853dec
* LayoutLib: put a default image on the quickcontactbadge.Xavier Ducrohet2011-01-261-0/+4
| | | | Change-Id: I64b3f4004801ec03f374460384f9a492e66bfaf0
* LayoutLib: properly erase the bitmap when rendering a new session.Xavier Ducrohet2011-01-264-8/+26
| | | | | | | This fix the issue where going from a full theme to a dialog theme would show the dialog on top of the previous rendering. Change-Id: Ib52b9719f44b04969423547b9de8d039f90b6f46
* LayoutLib: return ViewInfo for all merged items + Build init.Xavier Ducrohet2011-01-256-14/+89
| | | | | | | android.os.Build is now initialized from the build properties parsed from the SDK build.prop file. Change-Id: If16953215ca90fb0beacb51bf405b89a5c8a34fa
* Merge "New orientation listener." into honeycombJeff Brown2011-01-242-0/+538
|\
| * New orientation listener.Jeff Brown2011-01-242-0/+538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The objective in this listener is to be more careful about the signal processing to prevent spurious orientation changes and to make all of the tweakable factors physically meaningful. The calibration is defined in terms of time constants and does not assume a particular discrete sampling rate. This is useful because it allows us to change the accelerometer sampling interval if desired without having to change the calibration. Moreover, the accelerometer sampling interval can vary +/- 20ms from one sample to the next even in normal circumstances. Proposed orientation changes are weighted by confidence factors that vary exponentially in relation to how close the device is to the ideal orientation change posture (screen is vertical, angle is exactly at the midpoint of the orientation quadrant, and no external acceleration beside gravity). When not in an ideal posture, the device takes proportionally longer to settle into a new orientation state. Added a little tool to plot the log output of the WindowOrientationListener. Check the README for more information about how to use it. Change-Id: I787f02d03582ff26367df65eda8d9ce85c5cb343
* | LayoutLib: Use special view cookie for include-merge case.Xavier Ducrohet2011-01-244-6/+118
|/ | | | | | | | All items directly under the <merge> tag now return the view cookie of the referencing <include> tag using a special class for easy differentiation in the calling client. Change-Id: I7a2a4e642be9564f47e256fd1586012497d34792
* Merge "visibility ("lights out") API." into honeycombJoe Onorato2011-01-231-0/+4
|\
| * visibility ("lights out") API.Joe Onorato2011-01-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Views may setSystemUiVisibility() to recommend that the system chrome (status bar or other UI) show or hide itself. (This functionality was previously available only via the FLAG_FULLSCREEN window flag for some SystemUI implementations.) 2. Views may register a OnSystemUiVisibilityChangedListener on a view, and find out when the system UI actually appears or disappears, allowing apps to coordinate the appearance of their own UI if desired. Bug: 3241144 Change-Id: Ia1758d94099182d49a1e3688ea2738ae4995b829
* | aapt: Allow raw "%" in unformatted string-arraysJosh Stone2011-01-231-0/+16
|/ | | | | | | | | | | | | | Commit 15fe2cb added format checking for translatable strings, enforcing the use of positional args. This check can be disabled on <string> values with translatable="false" or formatted="false". But they didn't check for those attributes on <string-array>, so some of CM's strings fail when they're not really format strings, just because they contain percent signs. (e.g. brightness widget's "Auto/Dim/40%/100%") So now the formatted/translatable attributes are checked in string-array too, and we can restore our proper percent signs. Change-Id: I3478ab7e0b939e61fe0cec20201ac55096264080
* Update preloaded-classes for Honeycomb.Jesse Wilson2011-01-211-10/+12
| | | | | | | | | | | | | | | | | | | | | We preload classes for two reasons. Classes that are popular can be shared and can increase the number of apps that can be run concurrently. Classes that initialize slowly can be initialized at system boot time by the zygote, decreasing the time to launch a specific app. To select which classes to preload, I exercised Android's built-in apps as well as these apps from Market: ESPN score center, Amazon, Flixster, Twitter, Adobe Reader, Ebay Mobile, Facebook, Solitare (Ken Magic), Barcode Reader, Google Earth and Square. A cycle of launching ~460 (non unique) activities in sequence took 9m35s with the previous preloaded-classes list. The update improves the launch time of the same sequence to 9m27s: the marginal improvement over the previous set of preloaded classes is negligible. http://b/3004763 Change-Id: Ida511ae31eeff6d95d9cb6aacae68b9bb9dd2ebe
* LayoutLib: properly configure ApplicationInfo with targetSdkVersion.Xavier Ducrohet2011-01-172-3/+9
| | | | Change-Id: I1bfef890206552843d1a7a8d0564741f2a37494f
* Allow TabHosts to have no children in the tabcontent widgetTor Norbye2011-01-171-18/+28
| | | | | | | | | | | Replace the code which throws an exception if there are no children in the FrameLayout that is the tabcontent, with code to add a single dummy tab. This makes the TabHost renderable in those scenarios where the real tabs are added dynamically rather than via XML. Change-Id: I72442bd7d40eddd875b3507585c1f372fcae3329
* LayoutLib: Update to use the new RenderResources API.Xavier Ducrohet2011-01-177-647/+103
| | | | Change-Id: Ic64eff3f324c4519da89bab10e6d59f0a9341a04
* Merge "LayoutLib: extract resource resolution into its own class." into ↵Xavier Ducrohet2011-01-169-561/+652
|\ | | | | | | honeycomb
| * LayoutLib: extract resource resolution into its own class.Xavier Ducrohet2011-01-169-561/+652
| | | | | | | | | | | | | | | | | | | | | | Next step is to make it a jar that will also live in ADT. The version in layoutlib will be through a prebuilt jar file, like ninepatch. Also add ninepatch.jar inside the layoutlib.jar file. Change-Id: I4a0cc9f2dd99709de6408386054c6d4abae7c824
* | Support non-rectangular input regions.Jeff Brown2011-01-161-1/+1
|/ | | | | | | | This enables the system bar to carve out a region through which events will be sent to the IME behind it. Bug: 3238092 Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
* LayoutLib: update logs to use new data bundleXavier Ducrohet2011-01-1422-91/+89
| | | | | | Also change some resource.resolve tags to resource.format Change-Id: I3f0b0d2eb69a5ec98375e4014a3bb1bfceb8c855
* LayoutLib: Misc fixes.Xavier Ducrohet2011-01-142-18/+34
| | | | | | | | | | | | | | | - Fix resource resolution for framework resources of type "id" that are dynamically generated through "@+id/..." - Proper implementation of setBitmap on a canvas that already has a bitmap. Transform/clip are kepts but the existing layers are replaced with the new bitmap - return a null service for INPUT_METHOD_SERVICE in Context.getSystemService Change-Id: I35e46fff50e6492a8995e95427d5f38bc945429d
* LayoutLib: Fix multi-line text rendering.Xavier Ducrohet2011-01-131-1/+1
| | | | | | Stupid indices. Change-Id: I1dbdd04b8f25a5769de8dc21e6c513cef3e35635
* LayoutLib: Use the new log tag constants from LayoutLogXavier Ducrohet2011-01-1323-90/+80
| | | | Change-Id: I29dd578ae16405358d3673caf13528be393f0967
* LAyoutLib: Fix build by adding missing IWindowSession implementation.Xavier Ducrohet2011-01-131-0/+6
| | | | Change-Id: I0af178d149b782cac3ae0c36fa5fc03f4dc6118b
* Merge "LayoutLib: move MockView back into its original package." into honeycombXavier Ducrohet2011-01-134-4/+4
|\
| * LayoutLib: move MockView back into its original package.Xavier Ducrohet2011-01-124-4/+4
| | | | | | | | | | | | | | | | | | | | This is used by Eclipse when the custom view is not found. It couldn't find the view in the new package either. We should probably move this logic of creating a mock view into the layout library instead. Change-Id: Ifa1a717cddf7004a7719bb4d0798cd53b43273ea
* | Merge "LayoutLib: Add getViewParent/getViewIndex on RenderSession." into ↵Xavier Ducrohet2011-01-131-0/+39
|\ \ | |/ | | | | honeycomb
| * LayoutLib: Add getViewParent/getViewIndex on RenderSession.Xavier Ducrohet2011-01-121-0/+39
| | | | | | | | Change-Id: If91aa837b71a7329f53b1c4190332c2296166940
* | Merge "LayoutLib: use tags in logs." into honeycombXavier Ducrohet2011-01-1224-101/+165
|\ \ | |/
| * LayoutLib: use tags in logs.Xavier Ducrohet2011-01-1224-101/+165
| | | | | | | | Change-Id: Ib85272249d285ecef409bf063903bcd91514a424
* | API CHANGE: startDrag() now takes "int flags" instead of "boolean localOnly"Christopher Tate2011-01-111-1/+1
|/ | | | | | | | | There will be, in the future, a flag (View.DRAG_FLAG_GLOBAL) that means for the drag to be cross-application. For now that flag constant is @hide and furthermore the server-side implementation strips it, enforcing local-only drags. Change-Id: I8db840480ab90e18a5b8ecf29d62b4e6eafd405e
* LayoutLib: Log error when style can't be found.Xavier Ducrohet2011-01-111-2/+3
| | | | Change-Id: I9a88cdac44a2d31c053e7f0c92a14e69bd82ac83
* Merge "LayoutLib: misc fix." into honeycombXavier Ducrohet2011-01-112-2/+4
|\
| * LayoutLib: misc fix.Xavier Ducrohet2011-01-112-2/+4
| | | | | | | | Change-Id: I0e2eff376d8f8e7682c28ef771b886d5fab5ff65
* | LayoutLib: Improve error reporting.Xavier Ducrohet2011-01-119-47/+35
| | | | | | | | Change-Id: I37cad7e2efb959202960c57b271c55c759867139
* | LayoutLib: fix XmlUtils.convertValueToIntXavier Ducrohet2011-01-113-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like the device implementation of Integer.parseInt is able to handle converting hexa value > 80000000 while the desktop VM cannot. This patch provide a fix for this. While implementing it and running the TestDegates test I realized that some delegate methods for Region were mising, so this adds them too. Change-Id: Ifee1efd47c8c52adc2f4658ec4fc8bd55adb84b4