Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I Guess ViewFlipper is required. Because when u want to animation between animation you required ViewFlipper for doing animation.</p> <p>do following things. I guess solve problem.</p> <p>Create New XML file and add ViewFlipper tab in it...</p> <p>use include tab to include all other layout when you want to do animation.</p> <p>and than use the following code</p> <pre><code>flipper = (ViewFlipper) findViewById(R.id.flipper); Button button1 = (Button) findViewById(R.id.Button01); // Button in one activity Button button2 = (Button) findViewById(R.id.Button02); // Button in second activity // Other Methods private Animation inFromRightAnimation() { // Animation inFromRight = new TranslateAnimation( /* * Animation inFromRight = new ScaleAnimation( * Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, * 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, * Animation.RELATIVE_TO_PARENT, 0.0f); */ Animation inFromRight = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f); inFromRight.setDuration(500); inFromRight.setInterpolator(new AccelerateInterpolator()); return inFromRight; } private Animation outToLeftAnimation() { // Animation outtoLeft = new TranslateAnimation( /* * Animation outtoLeft = new * ScaleAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, * Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, * 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); */ Animation outtoLeft = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f); outtoLeft.setDuration(500); outtoLeft.setInterpolator(new AccelerateInterpolator()); return outtoLeft; } private Animation inFromLeftAnimation() { // Animation inFromLeft = new TranslateAnimation( /* * Animation inFromLeft = new * ScaleAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, * Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, * 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); */ Animation inFromLeft = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f); inFromLeft.setDuration(500); inFromLeft.setInterpolator(new AccelerateInterpolator()); return inFromLeft; } private Animation outToRightAnimation() { // Animation outtoRight = new TranslateAnimation( /* * Animation outtoRight = new * ScaleAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, * Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, * 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); */ Animation outtoRight = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f); outtoRight.setDuration(500); outtoRight.setInterpolator(new AccelerateInterpolator()); return outtoRight; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload