I need to be able to change the contents of an ImageView at runtime with the results of a database query. The image would not be in the DirAssets folder and would be located at a web address.
I haven't been able to locate a solution using the ImageView so I tried a webview, writing out the html with the results of the db query. This works but I'm unable to catch a click event when the user clicks/touchs on the image.
Sorry, I should have explained better. Basically the images are logos from local advertisers that need to be rotated each time the app is accessed.
This is done by getting the name of the logo image with the earliest view datetime value from a database. That record is then updated with the current date time.
My problem is that advertisers are added and subtracted via a data entry website and the app would not be aware of the logo images of new advertisers.
That's why I would like to get the current image to be displayed from a website directory via a URL.
I wasn't able to find any way to assign the image to an ImageView at run-time.
When substituting a WebView for the ImageView and writing out the html in the LoadLayout area with the results of a database query, I'm not able to capture a click event on the image being displayed in the WebView.
If I understand you correctly, you have the URL of the pic let's say "http://www.mywebsite.com/picturename.jpg" and you want to add that to an ImageView, if the answer is yes, then you will have to download the picture using http and then update the ImageView.
Thank you. I guess that's the only option. I could probably search the phone first to see if the image had already been downloaded and then download if necessary.
I would just download the pic, you might end up having quite a few on your device already and you will be wasting time searching for it, if it exists the it will be overwritten.