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
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: 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
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: 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
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: 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
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: 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
Stop searching for code, let great code find you!  Add Codota to your java IDE

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: