ImageView setImageURI - 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 setImageURI method.

This code example shows how to use the following methods: setImageResource, setImageURI
   * @param value the value retrieved from the cursor 
   */ 
  @Implementation 
  public void setViewImage(ImageView v, String value) {
    try { 
      v.setImageResource(Integer.parseInt(value));
    } catch (NumberFormatException nfe) {
      v.setImageURI(Uri.parse(value));
    } 
  } 
 
  /** 
   * Called by bindView() to set the text for a TextView but only if 
   * there is no existing ViewBinder or if the existing ViewBinder cannot 
   * handle binding to an TextView. 
   * 
   * Intended to be overridden by Adapters that need to filter strings 
   * retrieved from the database. 
   * 
   * @param v TextView to receive text 
Full Snippet Info
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setImageResource, setImageURI
     * @param value the value retrieved from the cursor 
     */ 
    @Implementation 
    public void setViewImage(ImageView v, String value) {
        try { 
            v.setImageResource(Integer.parseInt(value));
        } catch (NumberFormatException nfe) {
            v.setImageURI(Uri.parse(value));
        } 
    } 
 
    /** 
     * Called by bindView() to set the text for a TextView but only if 
     * there is no existing ViewBinder or if the existing ViewBinder cannot 
     * handle binding to an TextView. 
     * 
     * Intended to be overridden by Adapters that need to filter strings 
     * retrieved from the database. 
     * 
     * @param v TextView to receive text 
Full Snippet Info
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: scrollTo, setImageURI, setScaleType
		super.onActivityResult(requestCode, resultCode, data);
 
		switch (resultCode) {
		case RESULT_OK:
			Uri targetUri = data.getData();
			imageView.setScaleType(ScaleType.CENTER_INSIDE);
			imageView.scrollTo(0, 0);
			imageView.setImageURI(targetUri);
			imageView.setScaleType(ScaleType.MATRIX);
			break; 
		} 
	} 
 
	public void buttonCropClick(View view) throws IOException {
		imageView.setDrawingCacheEnabled(true);
		imageView.buildDrawingCache(true);
		File imageFile = new File(Environment.getExternalStorageDirectory(),
				"Pictures/" + UUID.randomUUID().toString() + ".jpg");
		FileOutputStream fileOutputStream = new FileOutputStream(imageFile);
		Bitmap.createScaledBitmap(imageView.getDrawingCache(true), outputSize,
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setImageResource, setImageURI
     * @param value the value retrieved from the cursor 
     */ 
    @Implementation 
    public void setViewImage(ImageView v, String value) {
        try { 
            v.setImageResource(Integer.parseInt(value));
        } catch (NumberFormatException nfe) {
            v.setImageURI(Uri.parse(value));
        } 
    } 
 
    /** 
     * Called by bindView() to set the text for a TextView but only if 
     * there is no existing ViewBinder or if the existing ViewBinder cannot 
     * handle binding to an TextView. 
     * 
     * Intended to be overridden by Adapters that need to filter strings 
     * retrieved from the database. 
     * 
     * @param v TextView to receive text 
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setImageResource, setImageURI
	 *  
	 * @see #setViewImage(ImageView, int) 
	 */ 
	public void setViewImage(ImageView v, String value) {
		try { 
            v.setImageResource(Integer.parseInt(value));
        } catch (NumberFormatException nfe) {
            v.setImageURI(Uri.parse(value));
        } 
	} 
 
	/** 
	 * Called by bindView() to set the text for a TextView but only if there is 
	 * no existing ViewBinder or if the existing ViewBinder cannot handle 
	 * binding to an TextView. 
	 *  
	 * @param v 
	 *            TextView to receive text 
	 * @param text 
	 *            the text to be set for the TextView 
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setImageResource, setImageURI
	 *  
	 * @see #setViewImage(ImageView, int) 
	 */ 
	public void setViewImage(ImageView v, String value) {
		try { 
            v.setImageResource(Integer.parseInt(value));
        } catch (NumberFormatException nfe) {
            v.setImageURI(Uri.parse(value));
        } 
	} 
 
	/** 
	 * Called by bindView() to set the text for a TextView but only if there is 
	 * no existing ViewBinder or if the existing ViewBinder cannot handle 
	 * binding to an TextView. 
	 *  
	 * @param v 
	 *            TextView to receive text 
	 * @param text 
	 *            the text to be set for the TextView 
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: getDrawable, setImageBitmap, setImageURI, setScaleType
        Cursor cursor = getContentResolver().query(selectedImage,filePathColumn, null, null, null);
        cursor.moveToFirst();
        int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
        String picturePath = cursor.getString(columnIndex);
        cursor.close();
        bild.setImageBitmap(BitmapFactory.decodeFile(picturePath));
        bild.setScaleType(ScaleType.CENTER_INSIDE);
  
         
         
        } 
        if(requestCode ==1)
        { 
		 
		// TODO Auto-generated method stub 
		//Bundle extras = data.getExtras();     
		//Bitmap mImageBitmap = (Bitmap) extras.get("data");     
		//bild.setImageBitmap(mImageBitmap); 
		Log.d("Bild","sollte kommen");
	    bild.setImageURI(Uri.fromFile(file));

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setLayoutParams, setImageURI, assignContactUri
	public String getAddress() {
		return address;
	} 
 
	public QuickContactBadge getBadge(Context context) {
		QuickContactBadge badge = new QuickContactBadge(context);
		badge.setLayoutParams(new LayoutParams(
				(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, BADGE_SIZE, context.getResources().getDisplayMetrics()),
				(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, BADGE_SIZE, context.getResources().getDisplayMetrics())));
		if (contactId != -1) {
			badge.assignContactUri(getContactUri());
			badge.setImageURI(getPhotoUri(context));
		} else { 
			badge.setImageToDefault();
		} 
		return badge;
	} 
	 
	public boolean inRange(Vector<BluetoothDevice> neighbours) {
		for (BluetoothDevice d : neighbours) {
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setImageViewUri
 
	@Kroll.method 
	public void setImageViewUri(int viewId, String uriString)
	{ 
		Uri uri = Uri.parse(resolveUrl(null, uriString));
		remoteViews.setImageViewUri(viewId, uri);
	} 
 
	@Kroll.method 
	public void setOnClickPendingIntent(int viewId, PendingIntentProxy pendingIntent)
	{ 
		remoteViews.setOnClickPendingIntent(viewId, pendingIntent.getPendingIntent());
	} 
 
	@Kroll.method 
	public void setProgressBar(int viewId, int max, int progress, boolean indeterminate)
	{ 
		remoteViews.setProgressBar(viewId, max, progress, indeterminate);
	} 
 
Full Snippet Info
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setImageViewUri
 
	@Override 
	protected void setImageViewUri(int viewId, Uri contentUri) {
		super.setImageViewUri(viewId, contentUri);
		if (mExpandedView != null) {
			mExpandedView.setImageViewUri(viewId, contentUri);
		} 
	} 
 
	@Override 
	protected Notification buildNotification() {
		return getNotificationBuilder().build(); 
	} 
} 
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related ImageView setImageURI Questions & Answers:

setImageURI Method Overview
Sets the content of this ImageView to the specified Uri.
See Code Examples for other Android ImageView Methods: