933 Commits

Author SHA1 Message Date
Xavier Ducrohet
1d009fbd17 am 35064e5e: Merge "LayoutLib: add implementation of Bridge.renderDrawable()" into honeycomb
* commit '35064e5e3a04bda6211166630ccd49d522a8bd92':
  LayoutLib: add implementation of Bridge.renderDrawable()
2011-02-04 19:33:27 -08:00
Xavier Ducrohet
fd18f57328 LayoutLib: add implementation of Bridge.renderDrawable()
Change-Id: Ic4d96488fd1a2e5b7d24353bebc8fdb24262c1d1
2011-02-04 19:30:35 -08:00
Xavier Ducrohet
b627f78359 am b0d34f9c: LayoutLib: split RenderSession\'s base method into RenderAction.
* commit 'b0d34f9c99cbd43e8238c5952b19d032f02dd168':
  LayoutLib: split RenderSession's base method into RenderAction.
2011-02-04 18:27:30 -08:00
Xavier Ducrohet
b0d34f9c99 LayoutLib: split RenderSession's base method into RenderAction.
This will allow us to create RenderDrawable that extends RenderAction.

Change-Id: If9cd350453ceffae4859a925a7b436502b311f9c
2011-02-04 18:11:09 -08:00
Xavier Ducrohet
1480942d97 am 1126422e: LayoutLib: update to the new API.
* commit '1126422ee1f532d8582a4e3b56dbfe505c15e775':
  LayoutLib: update to the new API.
2011-02-04 18:05:55 -08:00
Xavier Ducrohet
1126422ee1 LayoutLib: update to the new API.
Change-Id: Ice028933cd2270c81c3d17f7bef7c5a9d14bd802
2011-02-04 17:41:43 -08:00
Xavier Ducrohet
57bb7faf97 am 3944b784: Merge "LayoutLib: Replace custom BitmapFactory by a simpler delegate" into honeycomb
* commit '3944b784e980b5e2cad69b2c8eb5dbc7c1fafc4a':
  LayoutLib: Replace custom BitmapFactory by a simpler delegate
2011-02-04 17:03:43 -08:00
Xavier Ducrohet
779c906592 LayoutLib: Replace custom BitmapFactory by a simpler delegate
Change-Id: Ie61a0a5b4426e64bb71a22d76d05efa4c0865e5e
2011-02-04 16:40:49 -08:00
Xavier Ducrohet
487742ea06 am 331e93e5: Merge "LayoutLib: render system/title/action bars." into honeycomb
* commit '331e93e5a20227665d2db8a46778b9544b91879a':
  LayoutLib: render system/title/action bars.
2011-02-04 11:45:36 -08:00
Xavier Ducrohet
bbbb832602 LayoutLib: render system/title/action bars.
Also a few generic fixes in the layoutlib itself to support
this.

Change-Id: Ie3f24c9056bd3cc72f39f8a4f2c0861be15bff55
2011-02-04 10:46:21 -08:00
Xavier Ducrohet
1ea9930e74 am 5e76e0ae: Merge "LayoutLib: Fix some rendering issues" into honeycomb
* commit '5e76e0aea28042287553ffa21826f59f601a3d2b':
  LayoutLib: Fix some rendering issues
2011-02-03 11:23:39 -08:00
Xavier Ducrohet
33758ef8c9 LayoutLib: Fix some rendering issues
Change-Id: I662a39a783de5bc7f3063f46cedaab11c7e6496e
2011-02-02 18:37:59 -08:00
Xavier Ducrohet
ca2f84c8fc am a4747d53: Merge "Make TimePicker/DatePicker/CalendarView render in Eclipse." into honeycomb
* commit 'a4747d536e905c3c34ab0d3c1c9c7485d6fac689':
  Make TimePicker/DatePicker/CalendarView render in Eclipse.
2011-02-02 15:52:18 -08:00
Xavier Ducrohet
345f866bfd Make TimePicker/DatePicker/CalendarView render in Eclipse.
Change-Id: Id5313a6f0f53bf45f6eaabc0e10fcf0660eeac08
2011-02-02 14:04:50 -08:00
Raphael
60e1eb4bfa am 03245a8e: Merge "LayoutLib.Create: support Outer_Inner_Delegate renaming." into honeycomb
* commit '03245a8ec46acc7c2b24d3d680ea5b88bd89ce13':
  LayoutLib.Create: support Outer_Inner_Delegate renaming.
2011-01-31 14:32:56 -08:00
Raphael
811820f440 LayoutLib.Create: support Outer_Inner_Delegate renaming.
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
2011-01-31 13:16:04 -08:00
Dianne Hackborn
371de96955 am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234':
  Normalize output from aapt d
2011-01-29 23:07:48 -08:00
Dianne Hackborn
a1f5e82f37 am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a30063d80c08434ac3c7316f338c6d54110449ab':
  Normalize output from aapt d
2011-01-29 23:04:50 -08:00
Dianne Hackborn
25eb04642c Merge "Normalize output from aapt d" 2011-01-29 22:53:20 -08:00
Dianne Hackborn
13cd966415 am e802b592: am 2107757d: am bbb5a5ce: Merge "Make AaptGroupEntry::getMncName accept mnc00"
* commit 'e802b59280540ce24ea1db61907a0f1f22f01fad':
  Make AaptGroupEntry::getMncName accept mnc00
2011-01-29 15:08:07 -08:00
Dianne Hackborn
e802b59280 am 2107757d: am bbb5a5ce: Merge "Make AaptGroupEntry::getMncName accept mnc00"
* commit '2107757dde0b3159119edcc9084fcb9a87985e88':
  Make AaptGroupEntry::getMncName accept mnc00
2011-01-29 15:05:30 -08:00
Dianne Hackborn
bbb5a5ce19 Merge "Make AaptGroupEntry::getMncName accept mnc00" 2011-01-29 14:38:48 -08:00
Xavier Ducrohet
b353495192 LayoutLib: update with Pair API.
Change-Id: Iba945153f7544872ea84e3311584223aea740e2e
2011-01-28 16:54:15 -08:00
Xavier Ducrohet
35ea7cd4c0 LayoutLib: Update with the new resource map APIs.
Change-Id: I30d83c2bb4569513f4f5e22670cffe938706f105
2011-01-28 11:44:21 -08:00
Xavier Ducrohet
1658422512 LayoutLib: Properly compute available space to layouts.
Also display placeholders for status/title/action bars depending
on if the app is a tablet and its theme.

Change-Id: I651c1a2e5cfde165e004c11b236e6df056853dec
2011-01-27 15:41:38 -08:00
Xavier Ducrohet
31fd1cf769 LayoutLib: put a default image on the quickcontactbadge.
Change-Id: I64b3f4004801ec03f374460384f9a492e66bfaf0
2011-01-26 17:30:59 -08:00
Xavier Ducrohet
5a82d8c58b LayoutLib: properly erase the bitmap when rendering a new session.
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
2011-01-26 16:34:53 -08:00
Xavier Ducrohet
7d7016e724 LayoutLib: return ViewInfo for all merged items + Build init.
android.os.Build is now initialized from the build properties
parsed from the SDK build.prop file.

Change-Id: If16953215ca90fb0beacb51bf405b89a5c8a34fa
2011-01-25 15:55:16 -08:00
Jeff Brown
aaa55d3f45 Merge "New orientation listener." into honeycomb 2011-01-24 15:31:22 -08:00
Xavier Ducrohet
82b9232565 LayoutLib: Use special view cookie for include-merge case.
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
2011-01-24 14:14:53 -08:00
Jeff Brown
4519f07e9c New orientation listener.
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
2011-01-24 13:46:57 -08:00
Joe Onorato
4c541b1303 Merge "visibility ("lights out") API." into honeycomb 2011-01-23 19:26:13 -08:00
Joe Onorato
664644d9e0 visibility ("lights out") API.
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
2011-01-23 19:22:52 -08:00
Josh Stone
02feeb4b2b aapt: Allow raw "%" in unformatted string-arrays
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
2011-01-23 16:00:36 -08:00
Dianne Hackborn
1240719ae0 am bcf2adeb: Merge "aapt: Allow raw "%" in unformatted string-arrays"
* commit 'bcf2adeb10c41becec3baa2bcb8de9212272399a':
  aapt: Allow raw "%" in unformatted string-arrays
2011-01-23 12:57:33 -08:00
Josh Stone
bf50322a24 aapt: Allow raw "%" in unformatted string-arrays
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
2011-01-22 21:13:12 -08:00
Jesse Wilson
8068618ebe Update preloaded-classes for Honeycomb.
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
2011-01-21 17:25:55 -08:00
Xavier Ducrohet
9d0577ec0c LayoutLib: properly configure ApplicationInfo with targetSdkVersion.
Change-Id: I1bfef890206552843d1a7a8d0564741f2a37494f
2011-01-17 22:58:41 -08:00
Tor Norbye
796992a942 Allow TabHosts to have no children in the tabcontent widget
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
2011-01-17 21:57:34 -08:00
Xavier Ducrohet
70552fb92d LayoutLib: Update to use the new RenderResources API.
Change-Id: Ic64eff3f324c4519da89bab10e6d59f0a9341a04
2011-01-17 14:00:29 -08:00
Xavier Ducrohet
87ab45c0fe Merge "LayoutLib: extract resource resolution into its own class." into honeycomb 2011-01-16 19:38:33 -08:00
Jeff Brown
fbf0977321 Support non-rectangular input regions.
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
2011-01-16 18:58:49 -08:00
Xavier Ducrohet
d1d6fafc7f LayoutLib: extract resource resolution into its own class.
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
2011-01-16 11:18:28 -08:00
Xavier Ducrohet
51a7e5447d LayoutLib: update logs to use new data bundle
Also change some resource.resolve tags to resource.format

Change-Id: I3f0b0d2eb69a5ec98375e4014a3bb1bfceb8c855
2011-01-14 16:56:00 -08:00
Xavier Ducrohet
0831b3fae5 LayoutLib: Misc fixes.
- 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
2011-01-14 15:15:34 -08:00
Xavier Ducrohet
bbefc8662a LayoutLib: Fix multi-line text rendering.
Stupid indices.

Change-Id: I1dbdd04b8f25a5769de8dc21e6c513cef3e35635
2011-01-13 18:02:08 -08:00
Xavier Ducrohet
918aaa5717 LayoutLib: Use the new log tag constants from LayoutLog
Change-Id: I29dd578ae16405358d3673caf13528be393f0967
2011-01-13 11:08:27 -08:00
Xavier Ducrohet
310a4d815b LAyoutLib: Fix build by adding missing IWindowSession implementation.
Change-Id: I0af178d149b782cac3ae0c36fa5fc03f4dc6118b
2011-01-13 10:43:00 -08:00
Xavier Ducrohet
1f1957f50f Merge "LayoutLib: move MockView back into its original package." into honeycomb 2011-01-13 10:22:53 -08:00
Xavier Ducrohet
66a95e4dbe Merge "LayoutLib: Add getViewParent/getViewIndex on RenderSession." into honeycomb 2011-01-13 10:22:43 -08:00