Skip to content

Instantly share code, notes, and snippets.

@owinocliff
Forked from pantos27/loader.java
Created May 19, 2019 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save owinocliff/9ac4261873b425cec5970ccdfd86dfea to your computer and use it in GitHub Desktop.
Save owinocliff/9ac4261873b425cec5970ccdfd86dfea to your computer and use it in GitHub Desktop.
load picture with Picasso with a rotating loading animation plcaeholder
Picasso.with( context )
.load( your_path )
.error( R.drawable.ic_error )
.placeholder( R.drawable.progress_animation )
.into( image_view );
<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/progress_image"
android:pivotX="50%"
android:pivotY="50%"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment