Implement simple flip

hope somebody can port it to Android version .