684385ddde2ac0c26de0862390ad713aff3fb149 |
|
19-Sep-2012 |
Romain Guy <romainguy@google.com> |
mutate() didn't work as advertised Bug #7162705 Change-Id: I15b2663fa7f1c71a2a3479134b8b7f37bfcbc607
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
5f49c3023a512efbef8bc9515d310c7a72be4af2 |
|
07-Sep-2012 |
Romain Guy <romainguy@google.com> |
The drawables cache strikes again Bug #7117785 Draawables created from the ConstantState cache found in Resources must be mutated before they can be safely modified by apps. Failure to do so results in all drawables sharing the same constant state to be affected by the modification. In the case of the bugreport above, the status bar code plays tricks with a background drawable and modifies its color to implement a fade in/out effect. This drawable comes from a cached resource (color 0x0) and the modifications made by the status bar apply to other clients of this drawable, most notably the recents panel. This change fixes several things: - Simplifies colors caching by removing the assetCookie from the key. This should result in better reuse of cached drawables - Makes View.setBackgroundColor() honor the mutate() contract - Ensure StateListDrawable properly mutates its children before modifying them - Optimize Bitmap/ColorDrawable to mark them mutated when they are not created from an existing ConstantSate. The same optimization should be applied to other drawables in the future Change-Id: I54adb5d5b914c7d8930bf9b46f7e3f9dcbf4bcab
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
908aecc3a63c5520d5b11da14a9383f885b7d126 |
|
01-Aug-2012 |
Dianne Hackborn <hackbod@google.com> |
Start moving away from DisplayMetrics.DENSITY_DEVICE. This puts in most of the infrastructure needed to allow us to switch between different densities at run time. The main remaining uses of the global are to initialize the Bitmap object (not sure what to do about that since it doesn't have anything passed in the constructor to get this information from), and being able to load drawables if we need a different density than what was preloaded by zygote. Change-Id: Ifdbfd6b7a5c59e6aa22e63b95b78d96af3d96848
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
7a23b49a8ceb07d3fa12c45fd42cd16131fd746a |
|
25-Apr-2012 |
Philip Milne <pmilne@google.com> |
Fixes for optical bounds feature. 1. Make the feature opt-in (ViewGroup::layoutMode defaults to CLIP_BOUNDS) without inheritance. 2. Rename COMPONENT_BOUNDS to CLIP_BOUNDS. 3. Rename LAYOUT_BOUNDS to OPTICAL_BOUNDS. 4. Complete GridLayout implementation. 5. Change the default_gap between components to 8dp, to align with the Style Guide. Change-Id: I8d40dfc5f4ca469f6424eb3ff60d07bec56e3a9f
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
bbd51f1e360b22eece1d74bd65c7e6a0b59dee59 |
|
19-Apr-2012 |
Philip Milne <pmilne@google.com> |
Share Insets instances between views that have the same background (Drawable) Change-Id: I47d93ccca6f553b678d25966d10d7a0a97cfa5ea
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
1557fd7809078e421f751efc7d2539b3efdc54b2 |
|
05-Apr-2012 |
Philip Milne <pmilne@google.com> |
Fix for bug 6110465. Add layout bound metadata to 9-patch files and make layouts take them into account. This CL contains a proposed API for dealing with layout bounds. This solution exposes: 1. Class: Insets - for storing layout Insets (and later possibly padding). 2. Methods: View:(get/set)LayoutInsets() - for storing layoutBounds. 3. Methods: ViewGroup:(get/set)LayoutMode() - for controlling layoutMode. It also iuncudes the changes to GridLayout to support layout bounds. Change-Id: I60c836b6530b61c5abf37f93ee9c44aad73573f1
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
ec4a50428d5f26a22df3edaf7e5b08f41d5cb54b |
|
04-Apr-2012 |
Amith Yamasani <yamasani@google.com> |
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
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
68d91733c873d80eb107b6e7a46228d9397b373e |
|
03-Nov-2011 |
Dianne Hackborn <hackbod@google.com> |
Some optimizations for view inflation. Change-Id: I8e5e6dda4d4c9776961d4a070549d5753588e582
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
61fd1e8d8c3ccf2d6b7d4af1c19e8f0988d5a1ec |
|
26-Oct-2011 |
Joe Fernandez <joefernandez@google.com> |
docs: add developer guide cross references, Project ACRE, round 3 Change-Id: I6125315ecdf0f78dd947c514a9944729d723e95d
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
4a123c4d69a1a73d0e16834700c3fe95034fe66e |
|
26-Apr-2011 |
Romain Guy <romainguy@google.com> |
Allow bitmap filtering on NinePatchDrawable. There's no reason to not allow it anymore. Change-Id: Id1881784e6abb49f1965af6595a77391b88b426f
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
6efd2bad954e0e5bd74916a32f036a0f149dcd4d |
|
13-Jan-2011 |
Christopher Lais <chris+android@zenthought.org> |
Don't drop the drawable cache completely on configuration change There was a lot of fancy code just above the clear to ensure that drawables that aren't affected by the change are kept, then the entire array was cleared. This patch removes the clear, so that the drawables that haven't changed are really kept, matching the logs, comments and larger part of the code. This patch also fixes the various constant states to return correct ChangingConfigurations. Change-Id: Ic11f6179537318d3de16dc58286989eb62a07f15 Old-Change-Id: I22495e6ed232dfe056207ce5155405af1fa82428
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
9891e1fce5f29d0421d34aa481037417bd70853d |
|
11-Nov-2010 |
Chet Haase <chet@google.com> |
Add invalidation to Drawable when its properties change invalidateSelf() already exists on Drawable. This triggers a call to callback listeners so that they know the drawable has been invalidated. For example, the background drawable on View will cause the View itself to be invalidated. Change-Id: I45b231a7600dcf3bc139e4059b7c9940ff49f60c
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
9db91243c5ace4421091557b76a0b1cbd2312fec |
|
12-Oct-2010 |
Romain Guy <romainguy@google.com> |
Simplify black texture fragment shader. Change-Id: If2d43f92f4c98ec128692761a670b0f31207a3c0
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
81859bc3d4d18f558b903db1306e76d0db115cf6 |
|
26-Sep-2010 |
Jean-Baptiste Queru <jbq@google.com> |
am ca3f968c: am 7d9c73fb: Merge "Prevent unhandled exception in NinePatchDrawable" Merge commit 'ca3f968c6f0acbf94988d00bf21a82a2e8f49b86' * commit 'ca3f968c6f0acbf94988d00bf21a82a2e8f49b86': Prevent unhandled exception in NinePatchDrawable
|
279d006b1d194c597a4c6b0a72f66ea6128851fa |
|
15-Sep-2010 |
Sonia Serafimova <sonia.serafimova@sonyericsson.com> |
Prevent unhandled exception in NinePatchDrawable Added null check in computeBitmapSize() to avoid unhandled exception "java.lang.NullPointerException" at android.graphics.Rect.<init>(Rect.java:72). This problem was discovered in the wild. Change-Id: I8a4729ceadcfc9744f11b8ceafdf24d6de88c645
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
deba785f122a47915756ffd991f5540d952cf937 |
|
08-Jul-2010 |
Romain Guy <romainguy@google.com> |
Add support to draw 9patches in OpenGL. This change only adds the necessary API and stubs. The implementation will be added in another change. Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
e57b7b09b198699adea91b6f9729007fda00834e |
|
06-Jan-2010 |
Cary Clark <cary@android.com> |
set nine patch padding initially to an empty rectangle Formerly, the padding state was set to null. Copying the padding state fails when the null rectangle contents are referenced. fixes http://b/2219785
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
b8a9f12802ca5d1738a098a1769a8ed7959f248b |
|
23-Sep-2009 |
Dianne Hackborn <hackbod@google.com> |
Fix #2101821: Cut labels of menu items in "SnapTell" market app. Ummmm... this turns out to be pretty bad. NinePatchDrawable was not scaling its reported padding for compatibility mode, causing spacing to be off. All over the place. This change should improve things quite a bit (and magically makes nearly all of the menu flaws go away). Change-Id: I94a8310d95b908b6f087db97d9afaed654ca6de5
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
c2974809373697147cbe5754835cc871fb93aef1 |
|
14-Sep-2009 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #2116977: buttons are huge and bent Now that we are using preloaded drawables in compatibilty mode, when constructing them from their constant state we need to set the new drawable's target density appropriately. Change-Id: I3665cbea09d38b9ac5f45f8c380dc8641f86b266
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
8cae124af2142687a6833dbaab8a43df6dd67b43 |
|
10-Sep-2009 |
Dianne Hackborn <hackbod@google.com> |
Various cleanup around resources and nine-patches. Remove the stuff that doesn't use preloaded drawables when in compatibility mode, since this works fine ever since we were able to deal with drawables in a different density than the canvas. Change the snapshot function on View to return a snapshot at the same size that will actually be drawn on screen (when in compatibility mode), to be able to show scaling artifacts and all. This change was original an attempt to fix issue #2101917: Text field edges appears to be improperly rounded. That turns out to probably be something deeper in the graphics system, but also included here is the debugging code I did to try to track down the problem to make it easy to turn on again later. Change-Id: I34bfca629639c7ff103f3989d88874112ef778d9
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
211db4a2874f1a2d0e7a8cb8d33e81fa08801763 |
|
11-Sep-2009 |
Mike Reed <reed@google.com> |
change default for dither to true
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
d9512a30d8e5c7780c3faf2fa59c076010f67b9e |
|
10-Sep-2009 |
Mike Reed <reed@google.com> |
default dithering to ON (cheap, looks good) officially ignore filtering (expensive, no real improvement)
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
4a51c20ce607c74914f90fd897f04080121ac13b |
|
22-Aug-2009 |
Dianne Hackborn <hackbod@google.com> |
I am getting tired of the java doc warnings, so fix them. Change-Id: I2205eebae419eaf4a0992c9f5b7cd807eb843fe1
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
11ea33471e1a14a8594f0b2cd012d86340dd3bd8 |
|
23-Jul-2009 |
Dianne Hackborn <hackbod@google.com> |
Allow for screen density drawables in compatibility mode. This change allows us to use drawables that match the current screen density even when being loaded in compatibility mode. In this case, the bitmap is loaded in the screen density, and the bitmap and nine-patch drawables take care of accounting for the density difference. This should be safe for existing applications, for the most part, since they shouldn't really be pulling the bitmap out of the drawable. For the small rare chance of them breaking, it worth getting the correct graphics. Also this will only happen when there is actually a resource of the matching density, and no existing apps should have resources for anything besides the default density (though of course all of the framework resources will be available in the native density). As part of this, the bitmap density API has been changed to a single integer provider the DPI unit density.
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
076357b8567458d4b6dfdcf839ef751634cd2bfb |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@132589
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
3dec7d563a2f3e1eb967ce2054a00b6620e3558c |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@137055
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
d24b8183b93e781080b2c16c487e60d51c12da31 |
|
11-Feb-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@130745
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
|