-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
corrected exit tranisition animation with zoom #179
base: master
Are you sure you want to change the base?
Conversation
Hi @KirkBushman , thanks for your contribution! The code looks fine to me, but I did some test, the result seems depend on the image, please test with this setting: companion object {
private const val THUMB_URL =
"http://img1.imgtn.bdimg.com/it/u=1520386803,778399414&fm=21&gp=0.jpg"
private const val SOURCE_URL =
"https://youimg1.c-ctrip.com/target/tg/773/732/734/7ca19416b8cd423f8f6ef2d08366b7dc.jpg"
} |
It happens because the height of the image is greater than the height of the view, so it tries to fit it using scale type, but the thumbnail scaleType and the mainView scaleType are not the same. For a better result we should use ScaleType fixXY on both, but since SSIV extends View and not ImageView, our hands are tied. it happens differently with this: private const val THUMB_URL = We should find a way to handle the scale type in SSIV, but the project is dead, no commits since may of last year, ignored all issues. We should evaluate using a fork that handles scale type the standard way. What do you think. |
Forking SSIV sounds not bad, you can try that :) |
Wait, I can't tell if you're joking, I already have a fork of that, will you switch to a fork? |
I'm not joking... If the issue could be fixed properly, I think it's okay to switch to another fork, at least for a special branch of BIV. |
Ok, this is a more broad and complicated task, I'll do it as soon as I have time free |
Hi @Piasy, long time no see, I was very busy during this month... I started getting back to solve this problem once and for all, reworking SSIV, but I'm encountering difficulties: since SSIV is extending View directly and not ImageView, it's very different, and I always end up with some problem at the end. But if anyone wants a quick fix for this type of problem, that works with both tall and wide images, you can watch my fork. Since SSIV, by default uses a scale implementation very similar to fit center, and only works well with that, if you set both thumbnail to android:scaleType="fitCenter" you should see it working. |
Hey it's me again. Maybe merge this till we can figure something out. |
Hi,
I'm committing what we discussed in #176,
I've fixed the sample app, divided in two activities, and fixed the exit out animation while zoomed in the second activity.
We can delay the exit animation using finishAfterTransition() and un-zooming with some controls that I added to BIV.
Check it out, and let me know if it's good to commit. I want to try this in my app.
PS: I see some distorsion on Fresco, I see it has it's own animations method, we should try that,
I think, this lib should not fix the weirdness of Fresco, we integrated well with transition animation, that should be the end of it.