Home » Android » How to Support GESTURE, left/right slip, many transition effect in Android application

How to Support GESTURE, left/right slip, many transition effect in Android application

Posted by: admin May 14, 2020 Leave a comment

Questions:

In My application i want to flip the view.. I have seen such animation in Go SMS pro in Android. And Same thing i want in to my android application.

I want to flip the whole activity view. is it possible ? I have seen some example for the flip in android. But in that all example the view is in the same activity. Is it possible to set such view for the different activity. or to do such effect while going from one activity to another ?

Please see the snap for the Flip effect in Androidenter image description here:

If Yes then please give reference to any demo example or code.

How to&Answers:

I have got a question whether it is possible to create a 3D transition effect between two Activities. There is a sample program that does it among the API Demos but this program plays the transition effect between two views of the same Activity. The adaptation to do the same between two activities is not very complicated but has some tricks…

Check out Rotate3dAnimation.java, it was actually copied from the API Demos sample. It uses a Camera (not the hardware camera but an object of the 2D graphics toolkit) to take the views of the layout from different angles. What it does now is a flip. Using the same mechanism, you can implement the cube too. The only problem is that for a cube animation you need both the outgoing and the incoming layout which makes nice separation into standalone activities sort of hard to do (the animation must work on both the incoming and the outgoing layout at the same time).

Answer:

Launcher in Cyanogenmod have many special effects like this, you can visit their github page, and see their code.

Answer:

try with this code Diff animation effect

Here MainActivity.class

 @Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Set window fullscreen and remove title bar, and force landscape orientation
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_main);
    setupJazziness(TransitionEffect.CubeOut);// change diff effect

}