user6556461
user6556461

Reputation: 377

XML Animation Effects Android

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

Answers (3)

Onkar Nene
Onkar Nene

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

Sohail Zahid
Sohail Zahid

Reputation: 8149

enter image description here

Read Detail from given link and understand its usage Full Link.

Upvotes: 0

Andrea Montanari
Andrea Montanari

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

Related Questions