Question

I have a really big problem, i need to load pictures (on the fly) within my Adapter for ListView.

The problem is that pictures have 'Authorization access' and i need Override this to add Header info

 @Override
 public Map<String, String> getHeaders() throws AuthFailureError {
 Map<String, String> params = new HashMap<String, String>();
     setup tokens...
 return params;
 }

So for this reason i am using ImageRequest from Volley (coz only there i can setup headers), and i am getting OutOfMemory when i scroll the list.

Can you please tell me if you know other solutions to send image request with Header info?

Or how to prevent this OutOfMemory?

Thanks

EDIT I tried lib AQuery

    AQuery aq = new AQuery(convertView);

    AjaxCallback<String> cb = new AjaxCallback<String>();
    cb.header(Consts.HEADER_APP_KEY, Consts.PREF_APP_KEY);
    aq.ajax(cb);
    aq.id(holder.profilePic).image(url, true, true, 0, 0, null, 0, 1.0f);

BUT IT'S NOT WORKING

Était-ce utile?

La solution

Try to use "Android Query" async image loading library.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top