Popularity
0.3
Stable
Activity
0.0
Stable
0
1
0

Description

View Flip Animation flip from one view to second on touch event.

Code Quality Rank: L4
Programming language: Java
Tags: Google     Material-design     Animations     Other     App     Java     Transitions    

flipTouchAnimation alternatives and similar packages

Based on the "Animations" category.
Alternatively, view flipTouchAnimation alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of flipTouchAnimation or a related project?

Add another 'Animations' Package

README

flipTouchAnimation

Flip from one view to next on touch: Steps: Create an xml file with two framelayout one for front and second for back.

<FrameLayout
    android:id="@+id/card_back"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:alpha="0">
    <include layout="@layout/card_back" />
</FrameLayout>

<FrameLayout
    android:id="@+id/card_front"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
    <include layout="@layout/card_front" />
</FrameLayout>

Then intilize both framelayout on your main activty.

overide onTouchEvent method in your main activity.

switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { lastY = event.getY(); lastX = event.getX(); mCurrAngle = Math.toDegrees(Math.atan2(Math.abs(x - lastX), Math.abs(lastY-yc))); System.out.println("first :" + mCurrAngle); break; } case MotionEvent.ACTION_MOVE: { moveCheck = true; mPrevAngle = mCurrAngle; mCurrAngle = Math.abs(Math.toDegrees(Math.atan2(Math.abs(x - lastX), Math.abs(lastY-yc)))); if (event.getX() <= lastX) swipeleftAnimation(); } else {
swiperightAnimation(); } } case MotionEvent.ACTION_UP : { if (event.getX() <= lastX) { swipeleftupAnimation(); } else { swiperightUpAnimation(); } mPrevAngle = mCurrAngle = 0; break; } } return true; }