Code example for ImageView

Methods: setImageResourcesetImageURI

0
     * @param v ImageView to receive an image 
     * @param value the value retrieved from the cursor 
     */ 
    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 a TextView. 
     * 
     * Intended to be overridden by Adapters that need to filter strings 
     * retrieved from the database. 
     *  
     * @param v TextView to receive text 
     * @param text the text to be set for the TextView