Lines Matching refs:icon
67 * icon bitmaps that are stored in the database (which were 74x74 pixels at hdpi size)
70 static Bitmap createIconBitmap(Bitmap icon, Context context) {
73 int sourceWidth = icon.getWidth();
74 int sourceHeight = icon.getHeight();
76 // Icon is bigger than it should be; clip it (solves the GB->ICS migration case)
77 return Bitmap.createBitmap(icon,
82 // Icon is the right size, no need to change it
83 return icon;
85 // Icon is too small, render to a larger bitmap
87 return createIconBitmap(new BitmapDrawable(resources, icon), context);
94 static Bitmap createIconBitmap(Drawable icon, Context context) {
103 if (icon instanceof PaintDrawable) {
104 PaintDrawable painter = (PaintDrawable) icon;
107 } else if (icon instanceof BitmapDrawable) {
109 BitmapDrawable bitmapDrawable = (BitmapDrawable) icon;
115 int sourceWidth = icon.getIntrinsicWidth();
116 int sourceHeight = icon.getIntrinsicHeight();
128 // Don't scale up the icon
149 // draw a big box for the icon for debugging
157 sOldBounds.set(icon.getBounds());
158 icon.setBounds(left, top, left+width, top+height);
159 icon.draw(canvas);
160 icon.setBounds(sOldBounds);