跳转至

翻转动画

Y轴翻转动画

Version 0.5.3

getBinding().textview1.setOnLongClickListener {
    flipYAnimation(getBinding().textview1, getBinding().textview2)
    false
}
getBinding().textview2.setOnLongClickListener {
    flipYAnimation(getBinding().textview1, getBinding().textview2)
    false
}
getBinding().textview1.setOnLongClickListener(v -> {
    RotationKt.flipYAnimation(getBinding().textview1, getBinding().textview2);
    return false;
});

getBinding().textview2.setOnLongClickListener(v -> {
    RotationKt.flipYAnimation(getBinding().textview1, getBinding().textview2);
    return false;
});

X轴翻转动画

Version 0.5.3

getBinding().textview1.setOnLongClickListener {
    flipXAnimation(getBinding().textview1, getBinding().textview2)
    false
}
getBinding().textview2.setOnLongClickListener {
    flipXAnimation(getBinding().textview1, getBinding().textview2)
    false
}
getBinding().textview1.setOnLongClickListener(v -> {
    RotationKt.flipXAnimation(getBinding().textview1, getBinding().textview2);
    return false;
});

getBinding().textview2.setOnLongClickListener(v -> {
    RotationKt.flipXAnimation(getBinding().textview1, getBinding().textview2);
    return false;
});

示例代码

查看示例代码