Exemple #1
0
 /// <summary>
 /// Called by bindView() to set the image for an ImageView but only if
 /// there is no existing ViewBinder or if the existing ViewBinder cannot
 /// handle binding to an ImageView.
 /// </summary>
 /// <remarks>
 /// Called by bindView() to set the image for an ImageView but only if
 /// there is no existing ViewBinder or if the existing ViewBinder cannot
 /// handle binding to an ImageView.
 /// By default, the value will be treated as an image resource. If the
 /// value cannot be used as an image resource, the value is used as an
 /// image Uri.
 /// This method is called instead of
 /// <see cref="setViewImage(ImageView, int)">setViewImage(ImageView, int)</see>
 /// if the supplied data is not an int or Integer.
 /// </remarks>
 /// <param name="v">ImageView to receive an image</param>
 /// <param name="value">the value retrieved from the data set</param>
 /// <seealso cref="setViewImage(ImageView, int)"></seealso>
 public virtual void setViewImage(android.widget.ImageView v, string value)
 {
     try
     {
         v.setImageResource(System.Convert.ToInt32(value));
     }
     catch (System.ArgumentException)
     {
         v.setImageURI(Sharpen.Util.ParseUri(value));
     }
 }
Exemple #2
0
 public virtual void setImageURI(System.Uri uri)
 {
     android.widget.ImageView image = (android.widget.ImageView) this.getNextView();
     image.setImageURI(uri);
     showNext();
 }