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 6773159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:38:04+00:00 2026-05-26T15:38:04+00:00

What is the below animation supposed to do? <?xml version=1.0 encoding=utf-8?> <rotate xmlns:android=http://schemas.android.com/apk/res/android android:fromDegrees=0

  • 0

What is the below animation supposed to do?

<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromDegrees="0"
    android:toDegrees="360"
    android:pivotX="50%"
    android:pivotY="50%"
    android:interpolator="@android:anim/linear_interpolator"
    android:duration="1000" />

Easy enough. It should represent a clockwise rotation about the centre. Just spin around once, then stop. Right?

And so it does… when I apply it to a View.

But when I animate an activity transition instead, something entirely different happens. The activity starts to rotate counterclockwise, but at the same time it flies off the top right of the screen. Then it comes back, still rotating counterclockwise and by now upside-down, and flies off the bottom left of the screen. Finally, it comes back and ends its rotation upright.

No matter what I specify for pivotX and pivotY, the behaviour is always the same. They seem to be ignored completely. And either way, the thing is certainly not rotating around any fixed pivot at all!

What kind of nonsense is this? Is it a bug?

For completeness, I saved this animation as res/anim/spin.xml, and invoke it as follows:

startActivity(intent);
overridePendingTransition(R.anim.spin, R.anim.spin);

(Using the same animation for both in and out makes no sense, but this is the minimal example.)


Update: Demo app to reproduce this issue

I’ve put together a minimal Android project that demonstrates the problem. The main activity looks like this:

package com.example.animtest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;

public class MainActivity extends Activity {

    private View rootView;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        rootView = getLayoutInflater().inflate(R.layout.main, null);
        setContentView(rootView);
    }

    public void animateRootView(View view) {
        Animation spin = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.spin);
        rootView.setAnimation(spin);
        spin.start();
    }

    public void animateActivity(View view) {
        Intent intent = new Intent();
        intent.setClassName("com.example.animtest", "com.example.animtest.MainActivity");
        startActivity(intent);
        overridePendingTransition(R.anim.spin, R.anim.spin);
    }

}

Here are the ZIP file with the project source and the runnable APK file. Tested on Nexus One, Android 2.2.2.

  • 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-26T15:38:05+00:00Added an answer on May 26, 2026 at 3:38 pm

    known issue .. till 2.3.4 nothing has been done 🙁
    http://code.google.com/p/android/issues/detail?id=10402

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

Sidebar

Related Questions

I have a css3 animation, im using the code below to rotate a cube
i am customizing the pie chart given on the raphael site below link http://raphaeljs.com/pie.html
Below is part of the XML which I am processing with PHP's XSLTProcessor :
(edit) It is supposed to rotate the fade between 3 images every 5 seconds.
I need to make 2 screens with custom animation like explained below : Screen
I am trying to remove a subview form a view with animation like below.
There is that app called turkey blast: reloaded (link below). The graphics and animation
the code below implement the switch between two view in a cube animation .
Does anyone know how to animate a radar animation like the image below? alt
My codes show below: CATransition *transition = [CATransition animation]; transition.duration = duration I hope

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.