Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7458171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:24:51+00:00 2026-05-29T13:24:51+00:00

I have created a viewflipper in order to flip between 2 views in android.

  • 0

I have created a viewflipper in order to flip between 2 views in android.

The problem is that I want to flip between these 2 views using the same animation (slide in).
It works when i flip from view 1 -> view 2 but it uses the reverse animation when I’m flipping from view 2 -> view 1

Same thing happens when I use 3 views, everything is ok when flipping 1->2->3 but it uses the reverse animation during 3->1

any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T13:24:52+00:00Added an answer on May 29, 2026 at 1:24 pm

    If you do like this you will be in full control of the animations and page flipping:

    //ViewFlipper
    ViewFlipper flipper;
    //Four different animations
    Animation OutToRight;
    Animation OutToLeft;
    Animation InFromRight;
    Animation InFromLeft;        
    
    OutToRight = new TranslateAnimation(
                  Animation.RELATIVE_TO_PARENT,  0.0f,      Animation.RELATIVE_TO_PARENT,  +1.0f,
                  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
                );
    OutToRight.setDuration(500);
            OutToRight.setInterpolator(new AccelerateDecelerateInterpolator());
    
            OutToLeft = new TranslateAnimation(
                  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,  -1.0f,
                  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
                );
          OutToLeft.setDuration(500);
        OutToLeft.setInterpolator(new AccelerateDecelerateInterpolator());
    
        InFromRight = new TranslateAnimation(
                  Animation.RELATIVE_TO_PARENT,  +1.0f, Animation.RELATIVE_TO_PARENT,   0.0f,
                  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
                );
        InFromRight.setDuration(500);
          InFromRight.setInterpolator(new AccelerateDecelerateInterpolator());
    
        InFromLeft = new TranslateAnimation(
                      Animation.RELATIVE_TO_PARENT,  -1.0f, Animation.RELATIVE_TO_PARENT,  0.0f,
                      Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
                    );
        InFromLeft.setDuration(500);
        InFromLeft.setInterpolator(new AccelerateDecelerateInterpolator());
    
        //Animating Left to page 1
    
        flipper.setInAnimation(InFromLeft);
        flipper.setOutAnimation(OutToRight);
        flipper.setDisplayedChild(1);
    
        //Animating right to page 2
        flipper.setInAnimation(InFromRight);
        flipper.setOutAnimation(OutToLeft);
        flipper.setDisplayedChild(2);
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created some forms using zendframework on my local machine that send the
I have created a mac application using the WebView. But issue is that webView
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a PHP-script to update a web server that is live inside
I have created a UserControl that has a ListView in it. The ListView is
I have created a C# class file by using a XSD-file as an input.
I have created a few small flash widgets that stream .mp3 audio from an
i have created a workflow activity that do give the item creater of a
Have created simple Ajax enabled contact forms before that have around 12 fields -
I have created a module in Magento which takes certain views from customers about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.