ImageView setImageBitmap - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ImageView setImageBitmap method.

This code example shows how to use the following methods: setLayoutParams, setPadding, setImageBitmap, setScaleType
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getTag, invalidate, setImageBitmap
    return(result);
  } 
 
  @Override 
  protected void onPostExecute(Bitmap bitmap) {
      if (path.equals(image.getTag())) {
        image.setImageBitmap(bitmap);
        image.invalidate();
      } 
       
      if (ex!=null) {
        Log.e("ImageLoadTask", "Exception loading image", ex);
      } 
  } 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: clearAnimation, getAnimation, getContext, getTag, setTag
 
    ImageView view = getView();
    if (view == null)
      return; 
 
    if (!equals(view.getTag()))
      return; 
 
    view.setTag(null);
    if (result != null) {
      if (fadeIn && view.getAnimation() == null)
        view.startAnimation(AnimationUtils.loadAnimation(view.getContext(),
            android.R.anim.fade_in));
      view.setImageBitmap(result);
    } else { 
      view.setImageDrawable(null);
      view.clearAnimation();
    } 
  } 
} 

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setLayoutParams, setPadding, setImageBitmap, setScaleType
	// Create the view for each user status 
	// [FIXME] Should be put as an XML file (possible?) 
	 
	private View makeUserStatusView(Context context, TwitterEntry entry) {
 
    	ImageView iv = new ImageView(context);
    	Bitmap photo = BitmapCache.getInstance().get(entry.getUser().getProfileImageURL());
 
    	iv.setImageBitmap(photo);
    	iv.setScaleType(ScaleType.CENTER);
    	iv.setPadding(0, 4, 4, 0);
    	iv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
	 
    	TextView tv = new TextView(context);
    	tv.setText(entry.getUser().getName() + ": " + entry.getText());
    	tv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
	 
    	LinearLayout layout = new LinearLayout(context);
    	layout.setOrientation(LinearLayout.HORIZONTAL);
    	layout.setPadding(4, 2, 4, 2);
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setAlpha, setBackgroundColor, setImageBitmap

Related ImageView setImageBitmap Questions & Answers:

Other ImageView setImageBitmap Examples

45:	        bitmap = BitmapFactory.decodeStream(stream);
46:	
47:	        imageView.setImageBitmap(bitmap);
48:	      } catch (FileNotFoundException e) {
49:	        e.printStackTrace();

Read More

210:						options);
211:	
212:				imgPreview.setImageBitmap(bitmap);
213:			} catch (NullPointerException e) {
214:				e.printStackTrace();

Read More

39:	        Bitmap bitmap=memoryCache.get(url);
40:	        if(bitmap!=null)
41:	            imageView.setImageBitmap(bitmap);
42:	        else
43:	        {

Read More

315:	
316:			protected void onPostExecute(Bitmap result) {
317:				bmImage.setImageBitmap(result);
318:			}
319:		}

Read More

setImageBitmap Method Overview
Sets a Bitmap as the content of this ImageView.
See Code Examples for other Android ImageView Methods: