Super Cool Android Paper shredder effect recommended _android

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.