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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:26:49+00:00 2026-06-12T03:26:49+00:00

I have an Image (which looks like a round loading circle) that I want

  • 0

I have an Image (which looks like a round loading circle) that I want to rotate around it’s own center.. I saw a lot of code which suggested to set the PivotY and PivotX to 0.5F or th half of the image. Both does not work.. After a lot of trial and error it does rotate around it’s own center with the following code:

ImageView loading = FindViewById<ImageView>(Resource.Id.loadingGif);
RotateAnimation rAnim = new RotateAnimation(0.0F, 359.0F,      Dimension.RelativeToSelf, 0.25F, Dimension.RelativeToSelf, 0.25F);
rAnim.Interpolator = new LinearInterpolator();
rAnim.RepeatCount = Animation.Infinite;
rAnim.Duration = 1000;
loading.StartAnimation(rAnim);

But the animation itself is not going smooth anymore, the image seems to rotate about 50degrees then starts to hang and skips half of the rotation and then continues normally on the top half of the rotation (I hope that makes any sense).

Any idea why my rotation does not rotate the full 360 degrees smoothly?

EDIT

I still haven’t solved this problem, but I did just discover something peculiar about it. The animation is used on a loading screen with no extra functionalities on the moment of the animation. I noticed that when I keep my finger on the screen the animation DOES happen smoothly!!

This got me thinking that the issue maybe isn’t in the animation code but something else.. but what I don’t know yet..

  • 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-12T03:26:51+00:00Added an answer on June 12, 2026 at 3:26 am

    I’ve finally found the answer!

    I’ve included the line:

    loading.setDrawingCacheEnabled(true);
    

    And after that had to change the pivots to 0.5F too. And now the animation runs smoothly!

    //Rotate image
    ImageView loading = FindViewById<ImageView>(Resource.Id.loadingGif);
    loading.setDrawingCacheEnabled(true);
    rAnim = new RotateAnimation(0.0F, 359.0F, Dimension.RelativeToSelf, 0.5F, Dimension.RelativeToSelf, 0.5F);  
    rAnim.Interpolator = new LinearInterpolator();
    rAnim.RepeatCount = Animation.Infinite;
    rAnim.Duration = 1500;
    loading.StartAnimation(rAnim);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIProgressView which I want to look like this image. I have
I have a 9-patch image file which looks like this: When I use it
I want to read xml file which looks like the following ... I have
Here is the mysterious: I have a scope which looks like this (in Image.rb)
Here is the mysterious: I have a scope which looks like this (in Image.rb)
I have a Questions table which looks like that as you see, there are
I have created a captcha which looks like this: <img src=/cgi-bin/rand.pl /> The problem
I have a piece of piece of HTML which looks like this - <div
i have a report which looks like this. it will be in PDF format:
I have a layout that looks kind of like this: And the code looks

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.