﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Crosslight - Changing ImageView in Android not Working</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Changing-ImageView-in-Android-not-Working/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Changing ImageView in Android not Working</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Changing-ImageView-in-Android-not-Working/</link><pubDate>Thu, 28 Aug 2014 05:19:59 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please find my sample posted on August 28, 2014 which shows how to load an image from a remote url and locally in &lt;a href="http://www.intersoftpt.com/Community/Crosslight/Crosslight-Help/" target="_blank"&gt;Crosslight Images&lt;/a&gt; thread.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;There are two buttons in the sample. When user press the button, it will change the "image placeholder" in ImageView with other images. The images loaded from a remote url and local.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please let me know whether the sample helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Changing ImageView in Android not Working</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Changing-ImageView-in-Android-not-Working/</link><pubDate>Wed, 13 Aug 2014 13:05:10 GMT</pubDate><dc:creator>devincroud</dc:creator><description>&lt;p&gt;Oh my code didn't post. &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;I'd really like to change the background image on the LinearLayout if possible to different images at runtime. &amp;nbsp;This works fine in iOS but not in Android. &amp;nbsp;Can't get the source to change. &amp;nbsp;Let me know if I can change the background of the LinearLayout as well.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;using Intersoft.Crosslight;
namespace Incroud
{
    public class SimpleBindingProvider : BindingProvider
    {
        #region Constructors

        public SimpleBindingProvider()
        {
			this.AddBinding ("LoginButton", BindableProperties.CommandProperty, "LoginCommand");
			this.AddBinding ("SignUpButton", BindableProperties.CommandProperty, "SignupCommand");
			this.AddBinding ("background", BindableProperties.ImageSourceProperty, "Image");

        }

        #endregion
    }
}

   public class SimpleViewModel : ViewModelBase
    {
        #region Fields
		private string _image;
        #endregion

        #region Properties
		public string Image
		{
			get { return _image; }
			set
			{
				if (_image != value)
				{
					_image = value;
					OnPropertyChanged("Image");
				}
			}
		}

      public SimpleViewModel()
        {
  this.Image = "fb_button.png";
await TaskEx.Delay (100);
this.Image = "anotherImage.png";
}
      &lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Changing ImageView in Android not Working</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Changing-ImageView-in-Android-not-Working/</link><pubDate>Wed, 13 Aug 2014 03:21:01 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Could you please add more information regarding the scenario which deals with changing ImageView. It would be much helpful if you could provide with a simple working sample.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Crosslight 2 has a sample named MyInventory_WebAPI. You can find following snippet code in ItemListBindingProvider.cs file.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;...
ItemBindingDescription itemBinding = new ItemBindingDescription()
{
	DisplayMemberPath = "Name",
	DetailMemberPath = "Location",
	ImageMemberPath = "ResolvedThumbnailImage",
	ImagePlaceholder = "item_placeholder.png"
};
...&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;By default, ItemList will shows &lt;em&gt;item_placeholder.png"&lt;/em&gt; which defined in ImagePlaceHolder. When the image is available, it will replace the &lt;em&gt;item_placeholder.png&lt;/em&gt; with the ResolvedThumbnailImage (which defined in ImageMemberPath).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Following snippet code (in Item.cs file) shows how ResolvedThumbnailImage property is defined.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;public string ResolvedThumbnailImage
{
	get
	{
		if (!string.IsNullOrEmpty(this.Image))
			return this.Settings.BaseImageUrl + "thumbs/" + this.Image;
		return string.Empty;
	}
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Look forward to hearing back from you.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Changing ImageView in Android not Working</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Changing-ImageView-in-Android-not-Working/</link><pubDate>Wed, 13 Aug 2014 02:27:39 GMT</pubDate><dc:creator>devincroud</dc:creator><description>&lt;p&gt;My code is working for iOS but not Android. &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>