Update the javaDoc for VectorDrawable and AnimatedVectorDrawable
b/30269243
Change-Id: I139a3fcac95c41a667fa06aa3223b812caad6243
(cherry picked from commit c224417511)
This commit is contained in:
committed by
Tenghui Zhu
parent
f9f8e82045
commit
d64255f61d
@@ -144,6 +144,55 @@ import java.util.ArrayList;
|
||||
* android:valueType="pathType"/>
|
||||
* </set>
|
||||
* </pre></li>
|
||||
* <p>
|
||||
* Since AAPT tool is now supporting a new format which can bundle several related XML files into
|
||||
* one, we can merge the previous example into one XML file, like this:
|
||||
* </p>
|
||||
* <pre>
|
||||
* <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
* <aapt:attr name="android:drawable">
|
||||
* <vector
|
||||
* android:height="64dp"
|
||||
* android:width="64dp"
|
||||
* android:viewportHeight="600"
|
||||
* android:viewportWidth="600" >
|
||||
* <group
|
||||
* android:name="rotationGroup"
|
||||
* android:pivotX="300.0"
|
||||
* android:pivotY="300.0"
|
||||
* android:rotation="45.0" >
|
||||
* <path
|
||||
* android:name="v"
|
||||
* android:fillColor="#000000"
|
||||
* android:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />
|
||||
* </group>
|
||||
* </vector>
|
||||
* </aapt:attr>
|
||||
*
|
||||
* <target android:name="rotationGroup"> *
|
||||
* <aapt:attr name="android:animation">
|
||||
* <objectAnimator
|
||||
* android:duration="6000"
|
||||
* android:propertyName="rotation"
|
||||
* android:valueFrom="0"
|
||||
* android:valueTo="360" />
|
||||
* </aapt:attr>
|
||||
* </target>
|
||||
*
|
||||
* <target android:name="v" >
|
||||
* <aapt:attr name="android:animation">
|
||||
* <set>
|
||||
* <objectAnimator
|
||||
* android:duration="3000"
|
||||
* android:propertyName="pathData"
|
||||
* android:valueFrom="M300,70 l 0,-70 70,70 0,0 -70,70z"
|
||||
* android:valueTo="M300,70 l 0,-70 70,0 0,140 -70,0 z"
|
||||
* android:valueType="pathType"/>
|
||||
* </set>
|
||||
* </aapt:attr>
|
||||
* </target>
|
||||
* </animated-vector>
|
||||
* </pre>
|
||||
*
|
||||
* @attr ref android.R.styleable#AnimatedVectorDrawable_drawable
|
||||
* @attr ref android.R.styleable#AnimatedVectorDrawableTarget_name
|
||||
|
||||
Reference in New Issue
Block a user