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
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
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
- 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
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
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
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
Only support animation for view move inside
the same layout.
Also fix animation thread to property support multiple
animation running at once.
Change-Id: I45cad84e7b9f3a4f281c956d32934eb74e807afb
The child can only be added to the new viewgroup
after it's been removed from the previous one, which
is delayed if there's an animation.
Change-Id: I9123a2670d0d17b3eb6f8f89085ebab8ca2b800f
There were two issues:
- Graphics2D.setClip only works on rectangular shapes.
This means doing a setClip on a non rectangular shape should
basically reset the clip and intersect with the new shape.
- the current clip can be null, so the combineShape method
must handle it.
Change-Id: Id2cd7475e991d8b533ff2e8850cc2c27663f9e52
Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed
regardless of the content of the strings.
Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf
DrawFilter, Rasterizer, ColorFilter and MaskFilter
are not supported but we need to provide their
JNI counterparts anyway, to at least display warnings
when they are used.
Also improved the API to query Paint for Shaders
and PathEffects, and clean up some code by
moving asserts into the DelegateManager.
Change-Id: I8942514565d28576d5608c6373bda25d86d42ff2
- When drawing is not clipped to the top layers,
drawing should not happen automatically on all
existing layers. Instead each layer's flags dictate
whether drawing should happen on layers beneath, starting
with the top layer.
- upon restore, the same mechanism is taken. Only blit
a layer into the layer beneath if it was drawn into
using the logic above.
Also fixed:
- saveLayer() does not, in fact, always save matrix
and clip info. The flag dictate this, the same way
it does in save()
- drawing code didn't properly detect the case of drawing
into layers if a save() was called after saveLayer().
Now the code only looks at the layer list which provide
all the needed info (flags mostly), and doesn't rely
on mLocalLayer (which is used during restore only now).
- Properly handle HAS_ALPHA_LAYER_SAVE_FLAG (or lack
thereof) when creating the BufferedImage for the layer.
Change-Id: I2fbbcc0f5d3a3dd208763705bc23e6658fd4e573
Layers require that drawing methods potentially
draw in more than one bitmaps.
To handle this this patch offers the following:
- move all drawing methods to use Drawable
- Drawables are now handled by GcSnapshot since
its the one handling the layers
- moved Canvas_Delegate.createCustomGraphics to
GcSnapshot which does not expose the Graphics2D
objects anymore so its draw() methods are the only
way to draw.
- handles creating layers in GcSnapshot.save() and
blitting them in restore()
Other changes:
- Clean up the create/save API in GcSnapshot
- Fixed drawing bitmaps with alpha and other
composite modes.
Change-Id: I1e230087493d044a10de71f4b6d29083e3f3bf64
- always set up the stroke. Paint may not have the proper
style when drawing lines. stroke should still be setup.
- Fixed vertical linear gradient. Old code generated
a gradient ratio of NaN
- Fixed alpha rendering when using shaders. In that
case the alpha channel from the paint color should be
used in conjunction with the shader.
- Fixed miter limit. Java expects the value to be multiplied
by the stroke width
- Fixed support for drawing ALPHA_8 bitmaps. Java2D doesn't
have bitmaps with only alpha channels, so we keep using
ARGB bitmaps but when drawing them into a bitmap we erase
the color information.
Change-Id: I4f04341fc843e3f7dadd1fdbf709b11a4f1e24b9
Also created delegates for all missing shader, xfermode
and patheffect classes. Moved the logic of the xfermode,
and patheffects that was in Canvas_Delegate into the
xfermode/patheffect classes, and added support (in all
3 clases) for knowing if the shader/xfermode/patheffect
is actually supported or not. Make use of fidelityWarning
in LayoutLog if they are not.
The first step is to allow the canvas to save only the matrix or
the clip. Previously, since the graphics2D were created completely
new on each save, everything was saved.
Also allows to set transform/clip on the Canvas when no bitmap
has been set (and therefore no Graphics2D exists).
This is required by BitmapFactory.
Change-Id: I37eff6dde1ca708d58ba317b40e9b3236f3ef3d0