How can I build an array of ImageView which will be initialize once and when I would want to draw an image on the screen I simply call that card on the specific position? I am building a blackjack application and for some reason when I'm trying to use photos that consist more than 200 kilobyte it runs slow, but with photos that consists 30 bytes it's fine! So I thought if I will store all the photos on the program instead withdrawal than each time it will save memory, right?
Asked
Active
Viewed 68 times
0
-
The file size is not relevant. I can make a 25kb PNG which needs more RAM than a 1mb PNG easily. What size are the images? – Simon Apr 27 '15 at 12:03
1 Answers
0
Images can be cached to local sd-card or phone memory. Url is considered the key. If the key is present in sd-card, display images from sd-card else display image by downloading from server and cache the same to location of your choice. The cache limit can set. You can also choose your own location to cache images. Cache can also be cleared.
For more information visit link
holder.ImgArticlePhoto = view.FindViewById<ImageView> (Resource.Id.img_ArticlePhoto);
Koush.UrlImageViewHelper.SetUrlDrawable (holder.ImgArticlePhoto,item.Image);

Community
- 1
- 1

Ibrahim Sušić
- 438
- 3
- 20
-
OK Thanks, but I didn't get where should I write that code in my project..? – Almog Talker Apr 27 '15 at 14:33
-
At the point where the loaded image, or where SET picture doing. Code in edit comm – Ibrahim Sušić Apr 27 '15 at 14:38
-
-
Where are you set your Image add code : ImageLoader imageLoader=new ImageLoader(context); ... imageLoader.DisplayImage(url, imageView); – Ibrahim Sušić Apr 27 '15 at 15:02
-
I'm using other method - imageView.setImageResource(R.drawable.image); to set the card each time a player draw... – Almog Talker Apr 27 '15 at 15:40
-
Ok for set, but my code cache your image i no every time get(URLimage) good for memory and speed app – Ibrahim Sušić Apr 27 '15 at 17:59
-
Yeah I know it's good for memory but I don't understand how to do it :( – Almog Talker Apr 28 '15 at 06:12
-
Create variable ImageView myImage = new ImageView; and add code Koush.UrlImageViewHelper.SetUrlDrawable (myImage,R.drawable.image); – Ibrahim Sušić Apr 28 '15 at 07:52