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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:08:51+00:00 2026-06-09T17:08:51+00:00

Image this scenario, I have a bitmap travelling across the screen from left to

  • 0

Image this scenario, I have a bitmap travelling across the screen from left to right and a button which when pressed will call clearAnimation()

When this button is pressed, it calls clearAnimation() on the travelling bitmap but the bitmap stays in the position (somewhere between left and right) on the screen.

What I actually would like to happen is that when the button is pressed, the bitmap ends up at the end of the animation point (right of the screen)

Any idea how to achieve this please? Below is my animation code

questionAnimation = AnimationUtils.loadAnimation(QuestionActivity.this, R.anim.left_to_right);
questionWrapper.setBackgroundDrawable(getResources().getDrawable(R.drawable.imageview_rounded));
questionWrapper.startAnimation(questionAnimation);
  • 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-09T17:08:52+00:00Added an answer on June 9, 2026 at 5:08 pm

    i think what is happening to your animation is that its setFillAfter() is setted to true by default or either you have setted it to true before applying animation, through java or from xml so first you should set setFillAfter to false or you can directly change setFillEnabled to false like here in xml applied to set

    <set xmlns:android="http://schemas.android.com/apk/res/android"
    android:fillAfter="false" >
    
    <translate
        android:duration="300"
        android:fromYDelta="100%p"
        android:toYDelta="0" />
    
    <alpha
        android:duration="300"
        android:fromAlpha="0.0"
        android:toAlpha="1.0" />
    
    </set>
    

    Or

    <set xmlns:android="http://schemas.android.com/apk/res/android"
    android:fillEnabled="false" >
    
    <translate
        android:duration="300"
        android:fromYDelta="100%p"
        android:toYDelta="0" />
    
    <alpha
        android:duration="300"
        android:fromAlpha="0.0"
        android:toAlpha="1.0" />
    
    </set>
    

    hence in this case when animation ends or clears it won’t retain views image (suspend your image in middle) so secondly you have to set the new place of your image i.e to the right of screen through code when you clear animation or animation ends up naturally, for that you have to place the actual view(ImageView) to new place (As this was being handled previously by FillAfter but due to its malfunctioning of suspending view on pressing clear animation you need to remove it so now you have to cover its functionality by urself) by setting properties of your ImageView like if it’s in RelativeLayout then by setting property of AlignParentRight to true.

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

Sidebar

Related Questions

This is a very common scenario: displaying images in a ListView which have to
This is the scenario: I have one image background set on an activity. On
I have 3 tables: tbl_Image from which a list of all images will be
In this scenario - I have image names (eg:- abc.jpg) saved in a database
I want to show image in a crystal report. Scenario is something like this.
I have this image: What I want to do is to add a UITapGestureRecognizer
I have this image: In this image I have 11 shapes (look like ellipses).
I have the image like this: I want to split it into six squares,
Scenario: I have one JFrame and JPanel added to that JFrame . on this
i have this scenario where im loading images using a for loop: for (var

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.