Android Glide: Show a blurred image before loading actual image

后端 未结 8 1104
谎友^
谎友^ 2021-02-01 06:37

I am developing an Android app which displays full screen images to the user. Images are fetched from the server. I am using Glide to show the image. But I want to display a ver

8条回答
  •  粉色の甜心
    2021-02-01 07:06

    Use BitmapFactory.Options.inSampleSize to make a downsampled version of the image, and upload both versions. Load the sample image (which should take less time) and when the bigger version is downloaded, switch to that. You could also use a TransitionDrawable to make a fade transition.

提交回复
热议问题