Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public class CircularLoading {
  2.  
  3. private Context context;
  4.  
  5. public CircularLoading(Context context) {
  6. this.context = context;
  7. }
  8.  
  9. public CircularProgressDrawable initLoading() {
  10. CircularProgressDrawable drawable = new CircularProgressDrawable(context);
  11. drawable.setStrokeWidth(5f);
  12. drawable.setCenterRadius(30f);
  13. drawable.start();
  14. return drawable;
  15. }
  16. }
  17.  
  18. Glide.with(context)
  19. .load(imagePath)
  20. .placeholder(new CircularLoading(context).initLoading())
  21. .into(holder.movieImage);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement