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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:25:35+00:00 2026-06-10T12:25:35+00:00

Possible Duplicate: Android: Animation Position Resets After Complete I’m using RotateAnimation to rotate an

  • 0

Possible Duplicate:
Android: Animation Position Resets After Complete

I’m using RotateAnimation to rotate an ImageView. The code is simple:

this.button.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        Animation ani = new RotateAnimation(
                0, /* from degree*/
                30, /* to degree */
                Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
        ani.setDuration(1000);
        imageView.startAnimation(ani);
    }
});

You can see I want the imageView rotate 30 degree.

It works, but when rotating is done, the image go back to the original state, the same position and degree before rotating.
I want to fix ImageView at last Animation position i.e want to fix the image tilted by 30 degree.
How to fix it?

  • 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-06-10T12:25:37+00:00Added an answer on June 10, 2026 at 12:25 pm

    I just find an solution:

    ani.setFillAfter(true);
    

    It works 🙂

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

Sidebar

Related Questions

Possible Duplicate: Flip-Animation for Activity-Change I'm new to Android Animation . I wanted to
Possible Duplicate: Android :Text Animation I want to know how I can implement the
Possible Duplicate: Sending Email in Android using JavaMail API without using the default android
Possible Duplicate: Using ZXing to create an android barcode scanning app I know it
Possible Duplicate: Android Unknown Command 'crunch' I have been using eclipse just fine but
Possible Duplicate: Android Left to Right slide animation Can i make the screen that
Possible Duplicate: how to change position of Toast in android? Is there any method
Possible Duplicate: Android : why PhoneCallListener still alive after activity finish? i'm making a
Possible Duplicate: Android Activity Life Cycle I am able to create a simple Splash
Possible Duplicate: Android, QR code library NOT ZXING I want to create an app

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.