glide image loading timeout increase

后端 未结 5 1039
半阙折子戏
半阙折子戏 2020-12-15 08:03

I am using glide to load images from URL. While I am fetching the images I am showing a loader in the image view. Some of the images being fetched are larger and therefore

5条回答
  •  醉梦人生
    2020-12-15 08:28

    You can use this method of the new version of glide

    .timeout(60000)
    

    the final code sample will be:

    Glide.with(imageView.getContext())
            .load(finalUrl)
            .timeout(60000)
            .placeholder(R.drawable.place_holder)
            .into(imageView);
    

提交回复
热议问题