Skip to content

Instantly share code, notes, and snippets.

@pantos27
Created October 6, 2016 06:51
Show Gist options
  • Save pantos27/4374697b08aecbcd51454bdb3f65a44d to your computer and use it in GitHub Desktop.
Save pantos27/4374697b08aecbcd51454bdb3f65a44d 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