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

  • SEARCH
  • Home
  • 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 7687827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:47:23+00:00 2026-05-31T19:47:23+00:00

I have found several guides on how to get a 3D animation to flip

  • 0

I have found several guides on how to get a 3D animation to flip views in ViewFlipper. They all use Camera and rotation to achieve the effect. I used this: http://code.google.com/p/android-3d-flip-view-transition/ – wrapper to achieve the results – and everything works just fine. That is, as far as the visual flipping is concerned.

What doesn’t work though is the button afer the flip is completed. It feels as if all the onClick events are either not received or are simply ignored after the flipping is completed. Here’s my very basic example.

XML:

<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
             android:id="@+id/selector_flipper">
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  android:id="@+id/playing_field"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:orientation="vertical">

            <Button android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:text="Flip"
                    android:onClick="flipView" />
    </LinearLayout>

    <ListView xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/tag_list"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:background="@android:color/white"/>
</ViewFlipper>

Activity:

public class SelectorActivity extends Activity {
    private ViewFlipper flipper;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.selector);
        flipper = (ViewFlipper)this.findViewById(R.id.selector_flipper);
    }

    /**
     * @see android.app.Activity#onKeyDown(int, android.view.KeyEvent)
     */
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK && tagList.getVisibility() == View.VISIBLE)
            flipView(null);
        else
            return super.onKeyDown(keyCode, event);
    }

    public void flipView(View v) {
        AnimationFactory.flipTransition(flipper, FlipDirection.RIGHT_LEFT);
    }
}

When the activity is created, I can click the “Flip” button – and the view flips as I want it to. I can then press the “back” button on the handset – and it flips back, just as I want it to. However now I can’t click the button any more – all the clicks are simply ignored.

Can anybody help me get to the bottom of this problem? Much appreciated!

P.S. I tried other wrappers and even coding the same animation myself – but the result has always been the same! Clicks do not work after the flip!

  • 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-31T19:47:24+00:00Added an answer on May 31, 2026 at 7:47 pm

    thanks for using my 3D view flip animation.

    The issue is a bug in Android in the way ViewGroup traverses who gets focus. I tried a number of fixes (some worked and some didn’t, but none were very elegant). But at the end, using AnimationSet instead of Animation did the trick. I’ve tried the fix on your code (that you emailed me) but also on a more complex code. The displayed view after a transition gets the touch focus.

    So, the latest update to android-3d-flip-view-transition in the googlecode project has the fix. Or, you can directly navigate to the revision by clicking here.

    Thanks and please mark this question as answered if you are satisfied with the fix.

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

Sidebar

Related Questions

I have found several examples using datamapper and was able to get them to
I have found several similar answers but I can't quite get why this is
I would like to use FastCGI with shell scripts. I have found several tutorials
I am trying to use ProGuard with Android. I have found several ProGuard scrips
I have found several post that teach how to use UIBezierPaths with CoreAnimation. This
I have found several other questions here on S.O. (and the web in general)
I have found several questions asking about template typedefs in C++0x, which are resolved
I've investigated several C# DLL's and have not found any that work especially well.
I've looked through several posts but I haven't quite found any answers that have
I have found several post with similar problems, but none targeting my exact problem:

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.