Setting imageview in android

前端 未结 3 488
孤街浪徒
孤街浪徒 2020-12-22 05:26

I have a JSON URL :: http://54.218.73.244:7006/DescriptionSortedRating/

JSON STRUCT::

\"restaurants\": [
    {
      \"         


        
3条回答
  •  失恋的感觉
    2020-12-22 05:38

    try this

    1. Download AndroidQuery jar from here.

    2. Put this jar to your libs folder and right click on jar and Build Path -> Add to bulid path

    3. How to use see this example

      AQuery androidQuery = new AQuery(this); // make AndroidQuery object 
      
      androidQuery.id(yourImageView).image(imageUrl, isCacheUrlImageOnMemery, isCacheUrlImageOnFile); //  use this way 
      
      isCacheUrlImageOnMemery - if true then given url image cahce on memery so after word android query check is given url image cahce on either memery or file then it take from cahce other wise it try to getting from url 
      
      isCacheUrlImageOnFile - same like isCacheUrlImageOnMemery but first of all android query check on memery then file in case if we have not much of memery then we cahce on file tht y two option are available.
      

提交回复
热议问题