summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2012-04-04 10:27:15 -0700
committerAmith Yamasani <yamasani@google.com>2012-04-04 12:05:59 -0700
commitec4a50428d5f26a22df3edaf7e5b08f41d5cb54b (patch)
treecd47b15082ff35879cf6e22a86f44108f45920aa /tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
parent58a40a3e92f8a53ac1068f0839dec4a1707fa6fb (diff)
downloadframeworks_base-ec4a50428d5f26a22df3edaf7e5b08f41d5cb54b.zip
frameworks_base-ec4a50428d5f26a22df3edaf7e5b08f41d5cb54b.tar.gz
frameworks_base-ec4a50428d5f26a22df3edaf7e5b08f41d5cb54b.tar.bz2
Embed layout padding in nine patch images
- Added a new custom PNG chunk that carries the layout padding ints. - Extract the padding ticks from .9.png images and store in the chunk. - Load the padding information at runtime into Bitmap and NinePatchDrawable. - The new chunk is ordered first so that it doesn't cause a problem in older versions of the platform. Bug: 6087201 Change-Id: I5de46167a1d44b3ec21065b0c165e594b1dc8399
Diffstat (limited to 'tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
index eadec02..b76b8cf 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
@@ -524,7 +524,8 @@ public final class Bitmap_Delegate {
int nativeInt = sManager.addNewDelegate(delegate);
// and create/return a new Bitmap with it
- return new Bitmap(nativeInt, null /* buffer */, isMutable, null /*ninePatchChunk*/, density);
+ return new Bitmap(nativeInt, null /* buffer */, isMutable, null /*ninePatchChunk*/,
+ density);
}
/**