/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/ndk/platforms/android-17/samples/Teapot/src/com/sample/helper/ |
D | NDKHelper.java | 77 Bitmap bitmap = null; in loadTexture() local 89 bitmap = BitmapFactory.decodeStream(new FileInputStream(file)); in loadTexture() 92 bitmap = BitmapFactory.decodeStream(context.getResources().getAssets() in loadTexture() 109 if (bitmap != null) in loadTexture() 111 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); in loadTexture() 119 Bitmap bitmap = null; in openBitmap() local 122 bitmap = BitmapFactory.decodeStream(context.getResources().getAssets() in openBitmap() 126 int originalWidth = getBitmapWidth(bitmap); in openBitmap() 127 int originalHeight = getBitmapHeight(bitmap); in openBitmap() 133 bitmap = scaleBitmap(bitmap, width, height); in openBitmap() [all …]
|
/development/ndk/platforms/android-18/samples/MoreTeapots/src/com/sample/helper/ |
D | NDKHelper.java | 77 Bitmap bitmap = null; in loadTexture() local 89 bitmap = BitmapFactory.decodeStream(new FileInputStream(file)); in loadTexture() 92 bitmap = BitmapFactory.decodeStream(context.getResources().getAssets() in loadTexture() 109 if (bitmap != null) in loadTexture() 111 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); in loadTexture() 119 Bitmap bitmap = null; in openBitmap() local 122 bitmap = BitmapFactory.decodeStream(context.getResources().getAssets() in openBitmap() 126 int originalWidth = getBitmapWidth(bitmap); in openBitmap() 127 int originalHeight = getBitmapHeight(bitmap); in openBitmap() 133 bitmap = scaleBitmap(bitmap, width, height); in openBitmap() [all …]
|
/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/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/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/Support7Demos/src/com/example/android/supportv7/graphics/ |
D | ImageLoader.java | 42 void onImageLoaded(Bitmap bitmap); in onImageLoaded() argument 71 protected void onPostExecute(Bitmap bitmap) { in loadMediaStoreThumbnail() 72 imageView.setImageBitmap(bitmap); in loadMediaStoreThumbnail() 74 if (bitmap != null) { in loadMediaStoreThumbnail() 76 CACHE.put(id, bitmap); in loadMediaStoreThumbnail() 79 listener.onImageLoaded(bitmap); in loadMediaStoreThumbnail()
|
/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/Support4Demos/src/com/example/android/supportv4/media/ |
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/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 …]
|
/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/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/cards/ |
D | TextCardView.java | 47 Bitmap bitmap = BitmapFactory in updateUi() local 49 …BitmapDrawable drawable = RoundedBitmapDrawableFactory.create(getContext().getResources(), bitmap); in updateUi() 52 Math.max(bitmap.getWidth(), bitmap.getHeight()) / 2.0f); in updateUi()
|
D | CharacterCardView.java | 59 Bitmap bitmap = BitmapFactory in updateUi() local 61 …BitmapDrawable drawable = RoundedBitmapDrawableFactory.create(getContext().getResources(), bitmap); in updateUi() 63 drawable.setCornerRadius(Math.max(bitmap.getWidth(), bitmap.getHeight()) / 2.0f); in updateUi()
|
/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/Support4Demos/src/com/example/android/supportv4/content/ |
D | FileProviderExample.java | 65 final Bitmap bitmap = Bitmap.createBitmap( in saveThumbnail() local 67 final Canvas canvas = new Canvas(bitmap); in saveThumbnail() 73 bitmap.compress(Bitmap.CompressFormat.PNG, 100, os); in saveThumbnail()
|
/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()
|