From a9809ef7f8004735571230004b77ebfdea12d424 Mon Sep 17 00:00:00 2001 From: ldn0x7dc Date: Thu, 30 Jun 2016 13:25:55 +0800 Subject: [PATCH] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index f507feb..0ff13ac 100644 --- a/README.md +++ b/README.md @@ -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) +