简体   繁体   中英

Android Text animation creating and adding

I want to create an animation for my textview that shows word by word ( each word takes like 100 milsec to show up), also has a background for each word ( not background for all of the textview )

Something like this: 字体示例

I know I should use xml for the anim but idk how to make each word show up after another

Thank you!

<objectAnimator
    android:propertyName="string"
    android:duration="int"
    android:valueFrom="float | int | color"
    android:valueTo="float | int | color"
    android:startOffset="int"
    android:repeatCount="int"
    android:repeatMode=["repeat" | "reverse"]
    android:valueType=["intType" | "floatType"]/>

<animator
    android:duration="int"
    android:valueFrom="float | int | color"
    android:valueTo="float | int | color"
    android:startOffset="int"
    android:repeatCount="int"
    android:repeatMode=["repeat" | "reverse"]
    android:valueType=["intType" | "floatType"]/>

<set>
    ...
</set>

compiled resource datatype: Resource pointer to a ValueAnimator, ObjectAnimator, or AnimatorSet. resource reference: In Java: R.animator.filename In XML: @[package:]animator/filename

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM