Ironman Ironman - 10 days ago 5
Android Question

Is there any way to add Java Library in Xamarin Android

Let say I am working on

RecyclerView
and Now in
RecyclerView
I want to load Image in
Asynchronously
. So I was search on Goolge and SO. I found this Thread.

In this thread discussion about Use this
library

https://github.com/koush/UrlImageViewHelper

But I don't know how to add this in my Project to work with it.

Any Help be Appreciated And Forgive me if this is silly question.

UpDate :

Now I have add the Library in my Project.

and To Load Image I use below code

string url = Settings.Base_URLs + "User/SetUser/" + item.DoctorId;
ImageView image = vh.searchimage;
Koush.UrlImageViewHelper.SetUrlDrawable(image, url);


But Image is not display.

Answer

You can add the UrlImageViewHelper from the Component store. Right click Components folder in your solution -> Get More Components -> Search for UrlImageViewHelper -> Add in the search box.

Also, have a look at Picasso component if you want asynchronous image download and cache.

You can use it as follows:

Koush.UrlImageViewHelper.SetUrlDrawable (imageView, "http://example.com/image.png", Resource.Drawable.placeholder);
Comments