CarlosPlusPlus
Lurker
Hi guy, I have a problem just on Android Nougat. It's strange that it works very well in previous Android versions and when I use just two basics imagesView.
What I really want is to flip 2 ViewGroups that contains more things like title for the cards, so on (as I said it works on previous versions of android).
My code for the animation is:
card_in
card_out
In the fragment, Importing my animations and setting my Views as target.
App:
-Before starting animation

-On animating
*as you can see it crops the bottom and the top.
What can be? I use SimpleDraweeView from Fresco Facebook Lib, Could it be the problem? Could it be an android bug?
Thank you guys for your help.
What I really want is to flip 2 ViewGroups that contains more things like title for the cards, so on (as I said it works on previous versions of android).
My code for the animation is:
card_in
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:valueFrom="1.0"
android:valueTo="0.0"
android:propertyName="alpha"
android:duration="0" />
<objectAnimator
android:valueFrom="-180"
android:valueTo="0"
android:propertyName="rotationY"
android:repeatMode="reverse"
android:duration="@integer/card_flip_time_full" />
<objectAnimator
android:valueFrom="0.0"
android:valueTo="1.0"
android:propertyName="alpha"
android:startOffset="@integer/card_flip_time_half"
android:duration="0" />
</set>
card_out
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:valueFrom="0"
android:valueTo="180"
android:propertyName="rotationY"
android:duration="@integer/card_flip_time_full" />
<objectAnimator
android:valueFrom="1.0"
android:valueTo="0.0"
android:propertyName="alpha"
android:startOffset="@integer/card_flip_time_half"
android:duration="0" />
</set>
In the fragment, Importing my animations and setting my Views as target.
Java:
private void changeCameraDistance() {
int distance = 8000;
float scale = getResources().getDisplayMetrics().density * distance;
mIcoImage.setCameraDistance(scale);
mIcoImage2.setCameraDistance(scale);
}
AnimatorSet mSetRightOut;
AnimatorSet mSetLeftIn;
private void loadAnimations() {
mSetRightOut = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(), R.animator.card_out_animation);
mSetLeftIn = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(), R.animator.card_in_animation);
}
boolean mIsBackVisible=false;
public void flipCard(View view) {
if (!mIsBackVisible) {
mSetRightOut.setTarget(view1);
mSetLeftIn.setTarget(view2);
mSetRightOut.start();
mSetLeftIn.start();
mIsBackVisible = true;
} else {
mSetRightOut.setTarget(view2);
mSetLeftIn.setTarget(view1);
mSetRightOut.start();
mSetLeftIn.start();
mIsBackVisible = false;
}
}
App:
-Before starting animation

-On animating
*as you can see it crops the bottom and the top.
What can be? I use SimpleDraweeView from Fresco Facebook Lib, Could it be the problem? Could it be an android bug?
Thank you guys for your help.