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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:48:25+00:00 2026-05-28T03:48:25+00:00

I have a train that rotates 45 degrees on a circular track every time

  • 0

I have a train that rotates 45 degrees on a circular track every time a button is pressed, but it flickers when it reaches each 90degrees. The way I approached it was by placing an invisible train at every 90 degrees on the track. When the animation is complete, I use the listener to make the train at the final destination visible because the animated version will disappear, which causes the flicker. When the train reaches destination it disappears, an the animation complete code makes the invisible view visible. Is there a better way to do this so no flicker occurs? I animate as follows:

    RotateAnimation animation = new RotateAnimation(index*90f,index2*90.0f,Animation.RELATIVE_TO_PARENT,0.50f,Animation.RELATIVE_TO_PARENT,0.50f);

animation.setDuration(2000);
animation.setAnimationListener(listener);
animation.reset();
View view = findViewById(R.id.train);
view.clearAnimation();
view.startAnimation(animation);
  • 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-28T03:48:25+00:00Added an answer on May 28, 2026 at 3:48 am

    animation.setFillAfter(true);

    Depending on the android version you’re using though this may not work as expected.

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

Sidebar

Related Questions

I have data in a backend server that is updated every minute. I'm writing
I have a three different tables that I'm trying to join up correctly but
I have two tables that look like this Train +----------+-------------+------+-----+---------+-------+ | Field | Type
I have someone I need to train in Java. That person is well versed
I have a database of bus/train/... stops and the arrival/departure times on each date
We have to train the client professionals on the source code for an application
I have table in data base name train delay, with columns train number(int), DelayTime(int),
In my app i have a loop that move on array of UIImage and
i have design an layout in that i have to place admob in bottom
I have a Zend Controller that serves files to users. I have used Noginn

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.