When initiating a drag and drop from a folder in home, you could sometimes see

a black background behind the icon. This was due to uncleared drawing caches.
This commit is contained in:
Romain Guy 2009-06-12 13:52:17 -07:00
parent fca59c759e
commit 91a9c9636f
1 changed files with 14 additions and 11 deletions

View File

@ -201,6 +201,9 @@ public class DragLayer extends FrameLayout implements DragController {
int color = v.getDrawingCacheBackgroundColor(); int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0); v.setDrawingCacheBackgroundColor(0);
if (color != 0) {
v.destroyDrawingCache();
}
v.buildDrawingCache(); v.buildDrawingCache();
Bitmap viewBitmap = v.getDrawingCache(); Bitmap viewBitmap = v.getDrawingCache();
int width = viewBitmap.getWidth(); int width = viewBitmap.getWidth();