Animated loading image in picasso

后端 未结 10 1626
醉酒成梦
醉酒成梦 2020-11-28 19:10

I have the following code to load an image in Picasso, using a drawable for the placeholder to display while the image is downloading. What I want though is an animated spin

10条回答
  •  天涯浪人
    2020-11-28 19:30

    Just add shape attribute in DBragion's answer as like below and it will work like charm. Happy coding.

    
    
        
    
            
    
                
    
                
            
        
    
        
            
        
    
    

    You can use Glide too:

    Glide.with(activity).load(url)
                        .apply(RequestOptions.centerInsideTransform())
                        .placeholder(R.drawable.progress_animation)
                        .into(imageview);
    

提交回复
热议问题