In the Android development, sometimes may want to use the paper shredder effect, today small arranges for everybody to tidy up the code, takes a look.
First look at the effect chart
Instance Code
Xml
<com.ldoublem.papershredderlib.papershredderview
android:layout_width= "200DP"
android:id= "@+id/ps_ Delete2 "
android:layout_height=" "220DP"
paper:sherderbgcolor= "#f4c600"
paper:sherdertext= "clean up"
Paper:sherdertype= "0"
paper:sherderpaperentercolor= "#56abe4"
paper:sherdertextshadow= "false"
Paper:sherdertextcolor= "#99101010"
paper:sherderpapercolor= "#dbdbdb"
paper:sherderprogress= "false"
/>
Java
Mpapershredderview.setshrededtype (PaperShredderView.SHREDEDTYPE.Piece);//paper effect and note effect
Mpapershredderview.setsherderprogress (false);
Mpapershredderview.settitle ("purge data");
Mpapershredderview.settextcolor (color.black);
Mpapershredderview.setpapercolor (color.black);
Mpapershredderview.setbgcolor (color.white);
Mpapershredderview.settextshadow (false);
Mpapershredderview.setpaperentercolor (color.black);
Mpapershredderview.startanim (1000);
Mpapershredderview.stopanim ();
Learn to use the above two pieces of code, Android developers can easily achieve the animation of the paper shredder, I hope this article for everyone's learning help, thank you for your support cloud habitat community.