385 Commits

Author SHA1 Message Date
Xavier Ducrohet
05bc8d7397 am cff6c845: am ae4bd059: ADT/Layoutlib: Reimplement parts of BitmapFactory
Merge commit 'cff6c8459ca05f3fee2d2999989d07a7176f955c'

* commit 'cff6c8459ca05f3fee2d2999989d07a7176f955c':
  ADT/Layoutlib: Reimplement parts of BitmapFactory
2010-01-19 00:01:32 -08:00
Xavier Ducrohet
36ab1284d8 ADT/Layoutlib: Add dash support to stroke.
Change-Id: I09a7e84948be013cbb11f6d9774ab81df897b424
2010-01-15 11:24:44 -08:00
Xavier Ducrohet
5ac8f409f5 ADT/Layoutlib: properly handle stroke information.
Change-Id: Iec9284d0e65d1313739e361d1fd5a522646fd1fd
2010-01-14 19:43:54 -08:00
Xavier Ducrohet
79f05bb4a5 Merge "ADT/Layoutlib: improved gradient drawing for perf." into eclair 2010-01-14 19:10:44 -08:00
Xavier Ducrohet
e8f4d7deab ADT/Layoutlib: improved gradient drawing for perf.
Change-Id: I79b909d7787e4442e7cfdf196de1ac0c077da7f8
2010-01-14 18:45:04 -08:00
Xavier Ducrohet
89d538dcca ADT/Layoutlib: don't draw 0-sized rectangle, AWT doesn't like that.
Change-Id: I298d00208ace2421478c5864cc5a66a508b2b411
2010-01-14 18:38:06 -08:00
Xavier Ducrohet
2dbb923aa0 ADT/Layoutlib: always use custom gradient (java) Paint.
The normal linear paint from AWT does not support our TileModes.

Change-Id: I24667671dabdf1a5dffa342e4de9cc69487db0b6
2010-01-14 17:17:25 -08:00
Xavier Ducrohet
374abf0b95 ADT/Layout: support for 3+ color in linear gradients
Change-Id: I14c6a5a1de41470c6f1c66d490492ecc727302f2
2010-01-14 15:15:35 -08:00
Xavier Ducrohet
5e08302426 ADT/Layoutlib: shader clean-up.
Change-Id: I0a200f438b7ccde2bfc19fd23614a647cb19d312
2010-01-14 10:37:13 -08:00
Xavier Ducrohet
63b2e61627 ADT/Layoutlib: 2 color, linear gradient support.
Change-Id: Ifaafa4fc42a22f4851449a7c35a5b82e211aafe7
2010-01-13 20:30:26 -08:00
Xavier Ducrohet
608cd11cdc ADT/Layoutlib: implement Canvas.concat(Matrix)
This prevented ImageView from making proper use of ScaleType.

Also fixed Canvas.getSaveCount() that returned the wrong
value and Matrix.getTransform() which used the wrong order
for the AffineTransform constructor!!

Bug: 2364564

Change-Id: I78babf4aa6689440e52ad06b1473f75b20eb66da
2010-01-13 18:17:59 -08:00
Xavier Ducrohet
ae4bd059ca ADT/Layoutlib: Reimplement parts of BitmapFactory
The original bitmap factory is mostly done in native and deals
with the normal android Bitmap class which has been replaced
in the layoutlib by a bitmap that is merely a wrapper around
an AWT BufferedImage.

This new BitmapFactory creates the layoutlib version of
Bitmap all in Java.

Change-Id: Ice8b5d19141a9a43f83349c159201bf85604b3b0
2010-01-13 16:43:07 -08:00
Xavier Ducrohet
6d40ee33f5 am f5a84f8a: am dfe25b0e: Merge "LayoutLib: support for custom styles." into eclair
Merge commit 'f5a84f8a7f91422f698ffbea3fabf77f2f7f77c8'

* commit 'f5a84f8a7f91422f698ffbea3fabf77f2f7f77c8':
  LayoutLib: support for custom styles.
2010-01-11 15:30:29 -08:00
Xavier Ducrohet
9ce3b775f5 LayoutLib: support for custom styles.
Change-Id: Ic6c2ef234589f45db15024261d698066aa6e2f4e
2010-01-11 14:28:03 -08:00
Romain Guy
2924a51fd0 Fix duplicate constant in layoutbridge. 2010-01-08 15:57:54 -08:00
Romain Guy
980a938c1c Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
2010-01-08 15:11:38 -08:00
Xavier Ducrohet
f80a762400 am de0ef181: am ce60d4b2: Merge "Move Layoutlib API library to sdk.git" into eclair
Merge commit 'de0ef181516ce13d292eafb741fa6c6b9dc1cb1c'

* commit 'de0ef181516ce13d292eafb741fa6c6b9dc1cb1c':
  Move Layoutlib API library to sdk.git
2010-01-07 09:22:16 -08:00
Xavier Ducrohet
82935938fa Move Layoutlib API library to sdk.git
Change-Id: I53f1c5d52447b6215ae7a6f2f1f82d0879e952ca
2010-01-07 08:57:32 -08:00
Tom Taylor
d4a4729c0c Update imports to android-common
Several files were moved to android-common. Update all the references
to import those files from the new location.
2009-12-21 13:59:18 -08:00
Xavier Ducrohet
a8ba3114e8 Layoutlib: Add a constant for default density value.
Change-Id: I6dc8a694bbdae2385d4e877ea04a6b4325a5719e
2009-12-11 14:20:54 -08:00
Dianne Hackborn
9ddb7df88a Fix build.
Change-Id: I70c86738e2894d7f8c51034aea8fda1585a6fcb3
2009-11-16 17:59:32 -08:00
Xavier Ducrohet
0da2676ea8 Minor fix for the parent style computation in the layoutlib.
This is an SDK change only.

Change-Id: Iae493184ae76b2e21200dd6bb48795ff74f79ab3
2009-11-15 16:15:33 -08:00
Xavier Ducrohet
76410f1eb3 Properly implement Paint.breakText for layoutlib.
BUG 2260400

Change-Id: I7082e366b65da0b5de2a6dbb547f66e05e0b78e0
2009-11-13 14:10:20 -08:00
Marco Nelissen
bf6956b1d9 Add a way for wallpapers to know the delta between virtual screens. 2009-11-09 17:39:33 -08:00
Xavier Ducrohet
9a4593ffcc Support for fallback fonts in layoutlib.
BUG 2041229

Change-Id: Ib12bcb7f6d8f0e4c2b51871f8129ecf51fa938ee
2009-11-09 14:55:08 -08:00
Brett Chabot
a86f28494c Fix layoutlib tests so they pas when run from Eclipse workbench.
Bug 2222616
2009-11-03 10:31:31 -08:00
Dianne Hackborn
7580493b01 Implement feature #2117336: Create event communication APIs for live wallpaper
Note: currently only implements an async version (no result), and not yet
actually tested.

Change-Id: Id47ed045a4b0eb309ea8c58daf41a0e03eff1d3a
2009-10-22 20:10:53 -07:00
Xavier Ducrohet
5f9d4bae03 layout lib tests cleanup
- Move test files to their own package for easy binary inclusion
  in adt-test
- fix some tests and remove obsolete ones.

Change-Id: I5b967f29074fdad74073f9b37d903eabe8dc29e6
2009-10-06 15:14:09 -07:00
Xavier Ducrohet
0a9d46b7e7 Add a test to make sure the replaced classes in layoutlib are correct.
Change-Id: I9641635153c12e2c0a23583f7d094767533fc683
2009-10-06 15:13:58 -07:00
Xavier Ducrohet
9f751ab3fc Reimplement all the method of Paint for layoutlib
There were a few missing methods that should have been reimplmented
(because they were native).

Others have been added just to be sure so that we can test whether methods
are missing or not (test coming soon).

Change-Id: I24895c353e38545e9b1abe28d41224fdc78cadb1
2009-10-05 19:10:04 -07:00
Xavier Ducrohet
8c739671d2 Fix the layoutlib test to run from adt-tests.
Change-Id: I34f513429593dce9f781ed8a08c4664a5d6f9aa8
2009-10-05 15:36:53 -07:00
Xavier Ducrohet
ac7391de5f Refactor class/method names used by layoutlib_create.
Information about classes and methods that are replaced, renamed, removed
into CreateInfo, so that it can be used by the tests.

Change-Id: I8874a40503249416621aa90b2ca02dcaf30ecd57
2009-10-05 14:16:09 -07:00
Xavier Ducrohet
f18ccc13a6 Fix a warning output.
This was introduced by the dpi work.

Change-Id: I7c7b1596085f70532b8279139c287a2a58f57046
2009-09-28 12:59:33 -07:00
Dianne Hackborn
ffa424800d Fix issue #2133206: dialogs/menus should auto-dismiss when screen turns off
Lot of infrastructure for more things to go away when "clear system dialogs"
happens, and now do this when we turn on the lock screen.

Change-Id: I567130296fe47ce82df065ed58ef21b37416ceaf
2009-09-23 23:17:07 -07:00
Xavier Ducrohet
56a92e3ba0 Add density support to layoutlib so that bitmap are scaled if needed.
Change-Id: I00204bb136ccaa44deeafbe0ea8746fea9903341
2009-09-23 16:38:57 -07:00
Dianne Hackborn
de0dfb7b65 Fix issue #2125720 Weather Forecast Widget - graphics do not scale
I forgot to add the new density field to the Bitmaps' parcelable data.

Change-Id: I77cf3e93e356297e0caed6fc71b62b5cd8f79124
2009-09-23 14:26:02 -07:00
Xavier Ducrohet
39cd36ec1f Add density value to density enum.
This is going to be used as constant to both ADT classes and the
layoutlib.

Change-Id: Id9befe83c5c2be3fbc5f045c7ed21aa8ee0108cc
2009-09-22 21:00:12 -07:00
Xavier Ducrohet
ccb630df4b Add a new IResourceValue that knows about the density.
This will allow the layoutlib to resize bitmaps that are
not in the native density of the rendering.

Change-Id: If9dca6d51cd93a2083c96fce3ac64335ec6ad801
2009-09-22 18:30:22 -07:00
Dianne Hackborn
efa199f016 Add API to send an ordered sticky broadcast.
Change-Id: Ida7081204e226db0cd07ff618c08e308a909ec0c
2009-09-19 12:05:25 -07:00
Dianne Hackborn
fa82f22f1d Fix issue #2093608: Calendar widget takes a few seconds to launch
Avert your eyes!

The key change here is that RemoteViews can now call a Context API to
start its pending intent, which inside of the activity manager we can
use to determine to cancel the timeout delay for external entities
to disrupt the home screen.

Change-Id: If097cf7478cbed7a3c04a304050bd7fd5703d197
2009-09-17 18:01:35 -07:00
Android (Google) Code Review
d023f9a9a9 Merge change 24829 into eclair
* changes:
  Some optizations to wallpaper drawing/scrolling.
2009-09-14 18:45:42 -04:00
Dianne Hackborn
19382ac1a4 Some optizations to wallpaper drawing/scrolling.
First, fix some issues with the final wallpaper bitmap
we use: ensure it is always 16bpp, and make sure dithering
of its bitmap is turned off.   We take of dithering
when loading, to make sure we don't use it when drawing.

Also add new APIs to return the wallpaper with the equivalent
of Launcher's old FastBitmapDrawable.  As doing this, also load
the default wallpaper the same way as custom ones, taking care to
resize it as needed at load time.

Finally implement a mechanism for the window manager to wait
for the wallpaper to redraw at its new position before returning
from the application's call to change the offset.  This ensures
that the wallpaper better tracks the application.  Note that there
is a timeout in this wait that is relatively short, and if it
expires we will run for a while without waiting.

Change-Id: Ife449437746da85958bd447e0a6cf3d2223b398c
2009-09-14 15:29:44 -07:00
Raphael
7a79628cd9 Fix some LayoutBridge javadoc.
Change-Id: I255d1d58d3537403ac9a8a5c7adece30ae989ce0
2009-09-14 11:17:49 -07:00
Xavier Ducrohet
ad013fae0d Replace fullHeight support by fullSize (height and width)
This is useful for linearlayout in horizontal mode.
2009-08-21 12:55:59 -07:00
Xavier Ducrohet
d604ad1ad4 Support full length rendering.
New rendering method in ILayoutBridge to specify whether the rendering
height should be the specified height or if it should be the height
required by the layout (specified height is always the minimum).
2009-08-20 15:15:35 -07:00
Xavier Ducrohet
f369b7199f am ad4bc607: Merge change 21772 into donut
Merge commit 'ad4bc607bd236dd9b06df9cf89dc5e14541ff66c' into eclair

* commit 'ad4bc607bd236dd9b06df9cf89dc5e14541ff66c':
  Fix Resources#opeRawResource(int, TypedValue) in layoutlib.
2009-08-18 13:42:09 -07:00
Xavier Ducrohet
72e4bcd3d0 Fix Resources#opeRawResource(int, TypedValue) in layoutlib. 2009-08-18 13:35:55 -07:00
Xavier Ducrohet
f7064e18fb am ace6a5cf: Merge change 21408 into donut
Merge commit 'ace6a5cfc0d14a909b4b95bdfe16609188125baf' into eclair

* commit 'ace6a5cfc0d14a909b4b95bdfe16609188125baf':
  Improved drawing/matrix support in layoutlib
2009-08-18 11:01:19 -07:00
Xavier Ducrohet
1a8c1599de am c1c432f5: Merge change 21241 into donut
Merge commit 'c1c432f57b782ed9d8d65be7ea1bee1e1d7d7839' into eclair

* commit 'c1c432f57b782ed9d8d65be7ea1bee1e1d7d7839':
  Layoutlib now uses the dimen status_bar_height instead of hard-coded value
2009-08-18 08:44:59 -07:00
Dianne Hackborn
8df8b2b405 Allow wallpapers to get touch events. 2009-08-17 21:23:05 -07:00