Reputation: 377
I am totally new to XML Animation and i was studying about animating views where i came across the terms
android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"
Why are these terms used? How to decide what float value to use?
Upvotes: 1
Views: 121
Reputation: 1379
These terms are use for animation effects. Like you are scaling one object from specific X,Y coordinates to another.
1) fromXScale
& fromYScale
- use for starting position for scaling the object(Starting X / Y size offset)
2) toXScale
& toYScale
- use for ending position for scaling the object(Ending X / Y size offset)
Reference link - https://developer.android.com/guide/topics/resources/animation-resource.html
Hope it will help!
Upvotes: 1
Reputation: 8149
Read Detail from given link and understand its usage Full Link.
Upvotes: 0
Reputation: 98
I suggest you to read the official documentation, where it clearly explains how to set the float values.
An extract from the article:
android:fromAlpha
Float. Starting opacity offset, where 0.0 is transparent and 1.0 is opaque.
Upvotes: 0