What you should know about AnimatedVectorDrawable

What you should know about AnimatedVectorDrawable

Retty Tech Cafe #6

35e08efcf39d692f540047fb756eb4e3?s=128

konifar

July 22, 2016
Tweet

Transcript

  1. 8IBUZPVTIPVMELOPXBCPVU
 "OJNBUFE7FDUPS%SBXBCMF ʢ'SJʣ !LPOJGBS 3FUUZ5FDI$BGF

  2. 8IBUJT"OJNBUFE7FDUPS%SBXBCMF 8FDBOBOJNBUF7FDUPS%SBXBCMFCZVTJOH 0CKFDU"OJNBUPSBOE"OJNBUPS4FU  $IBOHFDPMPST QPTJUJPO  3PUBUFJDPO  .PSQIUPPUIFSJDPOTIBQF

  3. #FOFpU 8FDBOBOJNBUFOPUPOMZ7JFXCVUBMTP%SBXBCMF

  4. 5PEBZ*`MM/05UBML w %PDVNFOUBUJPOBOEJOUSPEVDUJPO
 IUUQTEFWFMPQFSBOESPJEDPNSFGFSFODFBOESPJEHSBQIJDTESBXBCMF "OJNBUFE7FDUPS%SBXBCMFIUNM
 IUUQTXXXZPVUVCFDPNXBUDI WXM'7**TU,N"

  5. 5PEBZ*XBOUUPUBML w 5IFLOPXMFEHFUIBUJT/05POUIFEPDVNFOUBOE 4FDPOETUFQUPVTF"OJNBUFE7FDUPS%SBXBCMF

  6. 5PEBZ`TTBNQMF

  7. *OUSPEVDUJPO  1VUBSSPXBOETUPQWFDUPSESBXBCMFYNM  $SFBUFBOJNBUPSYNM  $SFBUF"OJNBUFE7FDUPS%SBXBCMFYNM

  8. *OUSPEVDUJPO  1VUBSSPXBOETUPQWFDUPSESBXBCMFYNM  $SFBUFBOJNBUPSYNM  $SFBUF"OJNBUFE7FDUPS%SBXBCMFYNM SFTESBXBCMFJD@QMBZYNM
 SFTESBXBCMFJD@QBVTFYNM

  9. *OUSPEVDUJPO  1VUBSSPXBOETUPQWFDUPSESBXBCMFYNM  $SFBUFBOJNBUPSYNM  $SFBUF"OJNBUFE7FDUPS%SBXBCMFYNM BOJNBUPSBOJN@QMBZ@UP@QBVTFYNM
 BOJNBUPSBOJN@QBVTF@UP@QMBZYNM

  10. *OUSPEVDUJPO  1VUBSSPXBOETUPQWFDUPSESBXBCMFYNM  $SFBUFBOJNBUPSYNM  $SFBUF"OJNBUFE7FDUPS%SBXBCMFYNM ESBXBCMFBWE@QMBZ@UP@QBVTFYNM
 ESBXBCMFBWE@QBVTF@UP@QMBZYNM

  11. 1PJOU )PXUPTUBSUBOJNBUJPO

  12. )PXUPTUBSUBOJNBUJPO w "OJNBUFE7FDUPS%SBXBCMFJTOPUMJLFB 4UBUF-JTU%SBXBCMF w "DUVBMMZXFOFFEUPDBMMTUBSU NFUIPE QSPHSBNBUJDBMMZ

  13. )PXUPTUBSUBOJNBUJPO

  14. 1PJOU /PUJDFGPSNPSQIJOH

  15. /PUJDFGPSNPSQIJOH w "DUVBMMZXFDBOOPUBOJNBUFOPNBUUFSXIBU LJOEPG7FDUPS%SBXBCMF • 0⒏DJBMEPDVNFOUTBZTUIBU
 “Note that the paths

    must be compatible for morphing. In more details, the paths should have exact same length of commands, and exact same length of parameters for each commands.”
  16. $BO*NPSQIPSOPU w . - - [
 .---[.- --[ w .

    - - - [.  - - - [
 . - - - [.  - - - [
  17. $BO*NPSQIPSOPU w . - - [
 .---[.- --[ w .

    - - - [.  - - - [
 . - - - [.  - - - [ ̋ ✕
  18. 7FDUPSQBUI . 
 - 
 - 
 [

  19. 7FDUPSQBUI w "MQIBCFUJT$PNNBOE w ..PWFUP
 --JOFUP
 [#BDLUPUIFpSTUDPPSEJOBUF w 6QQFSDBTFDPNNBOENFBOT BCTPMVUFDPPSEJOBUF


    -PXFSDBTFDPNNBOENFBOT SFMBUJWFDPPSEJOBUF . 
 - 
 - 
 [
  20. 7FDUPSQBUI . 
 - 
 - 
 [

  21. 4BNFTIBQF . 
 - 
 - 
 - 
 [


    . 
 - 
 - 
 - 
 [
  22. . 
 - 
 - 
 - 
 [
 .

    
 - 
 - 
 - 
 [ . 
 - 
 - 
 - 
 [
 . 
 - 
 - 
 - 
 [ • 0⒏DJBMEPDVNFOUTBZTUIBU
 “Note that the paths must be compatible for morphing. In more details, the paths should have exact same length of commands, and exact same length of parameters for each commands.”
  23. . 
 - 
 - 
 - 
 [
 .

    
 - 
 - 
 - 
 [ . 
 - 
 - 
 - 
 [
 . 
 - 
 - 
 - 
 [ DPNNBOETMFOHUIBOEFYBDUMZTBNF DPNNBOET "MQIBCFU
  24. *U`TTPIBSE w :PVDBOVTF7FDU"MJHO5IJTUPPMDSFBUFWFDUPS QBUIUIBUBMMPXTNPSQIJOHFBDIWFDUPSQBUIT
 IUUQTHJUIVCDPNCPOOZGPOFWFDUBMJHO

  25. 4VNNBSZ

  26. "OJNBUFE7FDUPS%SBXBCMFJT SFBMMZBXFTPNF

  27. #VUJU`TTUJMMBMJUUMFIBSEUP NBOBHFWFDUPSQBUI

  28. 8FIBWFUPDSFBUFBXFTPNF UPPMPSTPNFUIJOH

  29. 5IBOLT

  30. /PUF w 1MBJEVTFT"OJNBUFE7FDUPS%SBXBCMF F⒎FDUJWFMZ8FDBOMFBSOBMPUGSPNJU
 IUUQTHJUIVCDPNOJDLCVUDIFSQMBJE w 7FDU"MJHOJTBXFTPNFUPPMUPDSFBUFWFDUPS QBUIUIBUBMMPXTNPSQIJOHFBDIWFDUPSQBUIT
 IUUQTHJUIVCDPNCPOOZGPOFWFDUBMJHO w

    %PDVNFOUBUJPOBOEJOUSPEVDUJPOWJEFP
 IUUQTEFWFMPQFSBOESPJEDPNSFGFSFODFBOESPJEHSBQIJDTESBXBCMF "OJNBUFE7FDUPS%SBXBCMFIUNM
 IUUQTXXXZPVUVCFDPNXBUDI WXM'7**TU,N"