Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ldn0x7dc committed Jun 30, 2016
1 parent 8dba34d commit a9809ef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,15 @@ The most common case is to transform an image, or a photo, which is famous as a



## Application

Besides transforming an image, this component is helpful in implementing transition animations.

For example, you want to transform a normal size content into a right-bottom floating small window (like the android youtube app). Using this component, you can do as following:

1. Calculate the normal rect and the final rect. A Rect(left, top, right, bottom) defines the boundary of a view
2. Use `ViewTransformer.getTransform(fromRect, toRect)` to get the transform object
3. Use `updateTransform(transform)` to make the tranform happen( This is immediate, but you can animate it by calculating the intermediate rects and then transform using your own animation loop)



0 comments on commit a9809ef

Please sign in to comment.