/development/samples/training/ContactsList/src/com/example/android/contactslist/util/ |
D | ImageLoader.java | 78 Bitmap bitmap = null; in loadImage() local 81 bitmap = mImageCache.getBitmapFromMemCache(String.valueOf(data)); in loadImage() 84 if (bitmap != null) { in loadImage() 86 imageView.setImageBitmap(bitmap); in loadImage() 210 Bitmap bitmap = null; in doInBackground() local 225 bitmap = processBitmap(params[0]); in doInBackground() 232 if (bitmap != null && mImageCache != null) { in doInBackground() 233 mImageCache.addBitmapToCache(dataString, bitmap); in doInBackground() 240 return bitmap; in doInBackground() 247 protected void onPostExecute(Bitmap bitmap) { in onPostExecute() argument [all …]
|
D | ImageCache.java | 89 protected int sizeOf(String key, Bitmap bitmap) { in init() 90 final int bitmapSize = getBitmapSize(bitmap) / 1024; in init() 101 public void addBitmapToCache(String data, Bitmap bitmap) { in addBitmapToCache() argument 102 if (data == null || bitmap == null) { in addBitmapToCache() 108 mMemoryCache.put(data, bitmap); in addBitmapToCache() 138 public static int getBitmapSize(Bitmap bitmap) { in getBitmapSize() argument 140 return bitmap.getByteCount(); in getBitmapSize() 143 return bitmap.getRowBytes() * bitmap.getHeight(); in getBitmapSize()
|
/development/samples/browseable/DisplayingBitmaps/src/com.example.android.displayingbitmaps/util/ |
D | RecyclingBitmapDrawable.java | 40 public RecyclingBitmapDrawable(Resources res, Bitmap bitmap) { in RecyclingBitmapDrawable() argument 41 super(res, bitmap); in RecyclingBitmapDrawable() 105 Bitmap bitmap = getBitmap(); in hasValidBitmap() local 106 return bitmap != null && !bitmap.isRecycled(); in hasValidBitmap()
|
D | ImageWorker.java | 128 public void setLoadingImage(Bitmap bitmap) { in setLoadingImage() argument 129 mLoadingBitmap = bitmap; in setLoadingImage() 285 Bitmap bitmap = null; in doInBackground() local 303 bitmap = mImageCache.getBitmapFromDiskCache(dataString); in doInBackground() 310 if (bitmap == null && !isCancelled() && getAttachedImageView() != null in doInBackground() 312 bitmap = processBitmap(mData); in doInBackground() 319 if (bitmap != null) { in doInBackground() 322 drawable = new BitmapDrawable(mResources, bitmap); in doInBackground() 326 drawable = new RecyclingBitmapDrawable(mResources, bitmap); in doInBackground() 414 public AsyncDrawable(Resources res, Bitmap bitmap, BitmapWorkerTask bitmapWorkerTask) { in AsyncDrawable() argument [all …]
|
D | ImageCache.java | 317 Bitmap bitmap = null; in getBitmapFromDiskCache() local 339 bitmap = ImageResizer.decodeSampledBitmapFromDescriptor( in getBitmapFromDiskCache() 353 return bitmap; in getBitmapFromDiskCache() 364 Bitmap bitmap = null; in getBitmapFromReusableSet() local 377 bitmap = item; in getBitmapFromReusableSet() 391 return bitmap; in getBitmapFromReusableSet() 614 Bitmap bitmap = value.getBitmap(); in getBitmapSize() local 619 return bitmap.getAllocationByteCount(); in getBitmapSize() 623 return bitmap.getByteCount(); in getBitmapSize() 627 return bitmap.getRowBytes() * bitmap.getHeight(); in getBitmapSize()
|
/development/samples/XmlAdapters/src/com/example/android/xmladapters/ |
D | ImageDownloader.java | 111 Bitmap bitmap = getBitmapFromCache(url); in download() local 113 if (bitmap == null) { in download() 117 imageView.setImageBitmap(bitmap); in download() 206 final Bitmap bitmap = sHardBitmapCache.get(url); in getBitmapFromCache() local 207 if (bitmap != null) { in getBitmapFromCache() 211 sHardBitmapCache.put(url, bitmap); in getBitmapFromCache() 212 return bitmap; in getBitmapFromCache() 219 final Bitmap bitmap = bitmapReference.get(); in getBitmapFromCache() local 220 if (bitmap != null) { in getBitmapFromCache() 222 return bitmap; in getBitmapFromCache() [all …]
|
/development/samples/devbytes/animation/ListViewCellInsertion/src/com/example/android/insertingcells/ |
D | CustomArrayAdapter.java | 104 Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), in getView() local 108 imgView.setImageBitmap(CustomArrayAdapter.getCroppedBitmap(bitmap)); in getView() 116 public static Bitmap getCroppedBitmap(Bitmap bitmap) { in getCroppedBitmap() argument 117 Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), in getCroppedBitmap() 120 final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); in getCroppedBitmap() 127 int halfWidth = bitmap.getWidth() / 2; in getCroppedBitmap() 128 int halfHeight = bitmap.getHeight() / 2; in getCroppedBitmap() 134 canvas.drawBitmap(bitmap, rect, rect, paint); in getCroppedBitmap()
|
/development/samples/devbytes/animation/ActivityAnimations/src/com/example/android/activityanim/ |
D | BitmapUtils.java | 63 Bitmap bitmap = getBitmap(resources, resourceId); in loadPhotos() local 64 Bitmap thumbnail = getThumbnail(bitmap, 200); in loadPhotos() 76 Bitmap bitmap = sBitmapResourceMap.get(resourceId); in getBitmap() local 77 if (bitmap == null) { in getBitmap() 78 bitmap = BitmapFactory.decodeResource(resources, resourceId); in getBitmap() 79 sBitmapResourceMap.put(resourceId, bitmap); in getBitmap() 81 return bitmap; in getBitmap()
|
/development/samples/browseable/RenderScriptIntrinsic/src/com.example.android.renderscriptintrinsic/ |
D | ThumbnailRadioButton.java | 60 public void setThumbnail(Bitmap bitmap) { in setThumbnail() argument 62 BitmapDrawable bmp = new BitmapDrawable(getResources(), bitmap); in setThumbnail() 71 rectChecked.setIntrinsicWidth(bitmap.getWidth() + strokeWidth); in setThumbnail() 72 rectChecked.setIntrinsicHeight(bitmap.getHeight() + strokeWidth); in setThumbnail() 81 rectUnchecked.setIntrinsicWidth(bitmap.getWidth() + strokeWidth); in setThumbnail() 82 rectUnchecked.setIntrinsicHeight(bitmap.getHeight() + strokeWidth); in setThumbnail() 104 setPadding(getPaddingLeft() + (int) ((bitmap.getWidth() - w) / 2.f + .5f), in setThumbnail() 105 getPaddingTop() + (int) (bitmap.getHeight() * 0.70), in setThumbnail()
|
/development/samples/browseable/MediaBrowserService/src/com.example.android.mediabrowserservice/ |
D | AlbumArtCache.java | 85 Bitmap[] bitmap = mCache.get(artUrl); in fetch() local 86 if (bitmap != null) { in fetch() 88 listener.onFetched(artUrl, bitmap[BIG_BITMAP_INDEX], bitmap[ICON_BITMAP_INDEX]); in fetch() 98 Bitmap bitmap = BitmapHelper.fetchAndRescaleBitmap(artUrl, in fetch() local 100 Bitmap icon = BitmapHelper.scaleBitmap(bitmap, in fetch() 102 bitmaps = new Bitmap[] {bitmap, icon}; in fetch()
|
/development/samples/devbytes/animation/ListViewExpandingCells/src/com/example/android/expandingcells/ |
D | CustomArrayAdapter.java | 109 public Bitmap getCroppedBitmap(Bitmap bitmap) { in getCroppedBitmap() argument 110 Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), in getCroppedBitmap() 113 final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); in getCroppedBitmap() 120 int halfWidth = bitmap.getWidth()/2; in getCroppedBitmap() 121 int halfHeight = bitmap.getHeight()/2; in getCroppedBitmap() 127 canvas.drawBitmap(bitmap, rect, rect, paint); in getCroppedBitmap()
|
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
D | LivePointerIconButton.java | 51 Bitmap bitmap = Bitmap.createBitmap(cursorSize, cursorSize, Bitmap.Config.ARGB_8888); in onResolvePointerIcon() local 52 Canvas canvas = new Canvas(bitmap); in onResolvePointerIcon() 81 final int hotSpotX = bitmap.getWidth() / 2; in onResolvePointerIcon() 82 final int hotSpotY = bitmap.getHeight() / 2; in onResolvePointerIcon() 83 return PointerIcon.create(bitmap, hotSpotX, hotSpotY); in onResolvePointerIcon()
|
/development/samples/devbytes/graphics/ImagePixelization/src/com/example/android/imagepixelization/ |
D | ImagePixelization.java | 155 public BitmapDrawable customImagePixelization(float pixelizationFactor, Bitmap bitmap) { in customImagePixelization() argument 157 int width = bitmap.getWidth(); in customImagePixelization() 158 int height = bitmap.getHeight(); in customImagePixelization() 172 bitmap.getPixels(bitmapPixels, 0, width, 0, 0, width, height); in customImagePixelization() 216 public BitmapDrawable builtInPixelization(float pixelizationFactor, Bitmap bitmap) { in builtInPixelization() argument 218 int width = bitmap.getWidth(); in builtInPixelization() 219 int height = bitmap.getHeight(); in builtInPixelization() 229 Bitmap pixelatedBitmap = Bitmap.createScaledBitmap(bitmap, downScaledWidth, in builtInPixelization() 278 public BitmapDrawable pixelizeImage(float pixelizationFactor, Bitmap bitmap) { in pixelizeImage() argument 280 return builtInPixelization(pixelizationFactor, bitmap); in pixelizeImage() [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | DensityActivity.java | 135 Bitmap bitmap; in addBitmapDrawable() local 136 bitmap = loadAndPrintDpi(resource, scale); in addBitmapDrawable() 140 final BitmapDrawable d = new BitmapDrawable(getResources(), bitmap); in addBitmapDrawable() 161 Bitmap bitmap; in addCanvasBitmap() local 162 bitmap = loadAndPrintDpi(resource, scale); in addCanvasBitmap() 164 ScaledBitmapView view = new ScaledBitmapView(this, bitmap); in addCanvasBitmap() 185 Bitmap bitmap; in loadAndPrintDpi() local 187 bitmap = BitmapFactory.decodeResource(getResources(), id); in loadAndPrintDpi() 191 bitmap = BitmapFactory.decodeResource(getResources(), id, opts); in loadAndPrintDpi() 193 return bitmap; in loadAndPrintDpi() [all …]
|
D | StaticTriangleRenderer.java | 191 Bitmap bitmap; in load() local 193 bitmap = BitmapFactory.decodeStream(is); in load() 202 GLUtils.texImage2D(GL_TEXTURE_2D, 0, bitmap, 0); in load() 203 bitmap.recycle(); in load()
|
D | TriangleRenderer.java | 93 Bitmap bitmap; in onSurfaceCreated() local 95 bitmap = BitmapFactory.decodeStream(is); in onSurfaceCreated() 104 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); in onSurfaceCreated() 105 bitmap.recycle(); in onSurfaceCreated()
|
/development/samples/devbytes/graphics/BitmapScaling/src/com/example/android/bitmapscaling/ |
D | BitmapScaling.java | 46 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), in onCreate() local 48 originalImageView.setImageBitmap(bitmap); in onCreate() 51 addScaledImageView(bitmap, i, container); in onCreate()
|
/development/samples/devbytes/animation/KeyframeAnimation/src/com/example/android/keyframeanimation/ |
D | KeyframeAnimation.java | 75 Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888); in getDrawableForFrameNumber() local 76 Canvas canvas = new Canvas(bitmap); in getDrawableForFrameNumber() 82 return new BitmapDrawable(getResources(), bitmap); in getDrawableForFrameNumber()
|
/development/samples/browseable/RecipeAssistant/Application/src/com.example.android.wearable.recipeassistant/ |
D | AssetUtils.java | 60 Bitmap bitmap = null; in loadBitmapAsset() local 64 bitmap = BitmapFactory.decodeStream(is); in loadBitmapAsset() 77 return bitmap; in loadBitmapAsset()
|
/development/samples/browseable/DataLayer/Wearable/src/com.example.android.wearable.datalayer/fragments/ |
D | AssetFragment.java | 46 public void setBackgroundImage(Bitmap bitmap) { in setBackgroundImage() argument 47 mPhoto.setImageBitmap(bitmap); in setBackgroundImage()
|
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
D | PrintBitmap.java | 77 Bitmap bitmap = ((BitmapDrawable) mImageView.getDrawable()).getBitmap(); in print() local 80 printHelper.printBitmap("Print Bitmap", bitmap); in print()
|
/development/samples/Snake/src/com/example/android/snake/ |
D | TileView.java | 100 Bitmap bitmap = Bitmap.createBitmap(mTileSize, mTileSize, Bitmap.Config.ARGB_8888); in loadTile() local 101 Canvas canvas = new Canvas(bitmap); in loadTile() 105 mTileArray[key] = bitmap; in loadTile()
|
/development/samples/devbytes/animation/ListViewDraggingAnimation/src/com/example/android/listviewdragginganimation/ |
D | DynamicListView.java | 171 Bitmap bitmap = getBitmapFromView(v); in getBitmapWithBorder() local 172 Canvas can = new Canvas(bitmap); in getBitmapWithBorder() 174 Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); in getBitmapWithBorder() 181 can.drawBitmap(bitmap, 0, 0, null); in getBitmapWithBorder() 184 return bitmap; in getBitmapWithBorder() 189 Bitmap bitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888); in getBitmapFromView() local 190 Canvas canvas = new Canvas (bitmap); in getBitmapFromView() 192 return bitmap; in getBitmapFromView()
|
/development/samples/browseable/AgendaData/Application/src/com.example.android.wearable.agendadata/ |
D | CalendarQueryService.java | 194 Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.nobody); in getDefaultProfile() local 195 return Asset.createFromBytes(toByteArray(bitmap)); in getDefaultProfile() 208 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in getProfilePicture() local 209 if (bitmap != null) { in getProfilePicture() 210 return Asset.createFromBytes(toByteArray(bitmap)); in getProfilePicture() 223 private static byte[] toByteArray(Bitmap bitmap) { in toByteArray() argument 225 bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream); in toByteArray()
|
/development/samples/devbytes/animation/PictureViewer/src/com/example/android/pictureviewer/ |
D | PictureViewer.java | 64 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), in onCreate() local 66 drawables[i] = new BitmapDrawable(getResources(), bitmap); in onCreate()
|