Reputation: 31
I want to use animation for full screen image preview similar to Facebook. When user clicks on image, vertical transition animation occurs and image resizes to device full screen.(Same when we click on the image from newsfeed page in facebook).
I tried to use Fresco library for the same but there are some integration problems. Can anyone suggest for solution for this problem?
Thanks in advance.
Upvotes: 0
Views: 1864
Reputation: 9223
Facebook Rebound Library does the animation that you want, but you have to implement your own code to make it work.
Here is the Facebook Rebound Library Example in action.
You can check out the Example Code at Facebook Github Profile.
Upvotes: 1
Reputation: 867
You can use set xml for zooming a view. adjust yours bounds and you can zoom your view from its position to any much extent you want .Here is a working example. change the values of pivotX and pivotY as you want.
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true" >
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="800"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="20%"
android:pivotY="20%"
android:toXScale="0.8"
android:toYScale="0.8" >
</scale>
</set>
Upvotes: 0