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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:27:27+00:00 2026-06-08T17:27:27+00:00

I read a lot about Animation pre Honeycomp, and that changes only take account

  • 0

I read a lot about Animation pre Honeycomp, and that changes only take account inside drawing. I have to support versions down to 2.1, so Animator isn’t an Option, too.

I have a LinearLayout, containing two Buttons laying on the right side of the screen. On some Events I Animate the right Button out of the View. Unfortunately the Click-ecents are registered on their original positions. As a workaround, I added an AnimationListener, and set the Buttons visibility to View.GONE on AnimationEnd, and bring it back with View.VISIBLE if the Button is animated In again. This leads to an ugly flash of the Layout which is animated if I apply the Visibility.

Is there another way to keep track of the Views after the Animation? Can I remove a View, without resulting in a flash inside the containing Layout (maybe some sort of doubleBuffering)?

EDIT:
the term Flash means that the view dissaperas on its Position for a very short period and appears after it again on the same Position. It happens exactly if onAnimation[Start|End] changes something inside that Layout

  • 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-08T17:27:28+00:00Added an answer on June 8, 2026 at 5:27 pm

    by “flash” , do you mean that the views jump to their new location? or do you mean that during the transition between the animation end , there is something that looks like a bug that moves the view for a split of a second to its original position?

    in any case , here’s a sample code that worked for me on a similar scenario . you will of course need to change it. i hope it could help you:

    final int deltaXToMove=50;
    TranslateAnimation translateAnimation=new TranslateAnimation(0,deltaXToMove,0,0);
    int animationTime=1000;
    translateAnimation.setDuration(animationTime);
    translateAnimation.setFillEnabled(true);
    translateAnimation.setFillAfter(true);
    final Button b=(Button)findViewById(R.id.button);
    translateAnimation.setAnimationListener(new AnimationListener()
      {
      @Override
      public void onAnimationEnd(Animation animation)
        {
        animation.setFillAfter(false);
        FrameLayout.LayoutParams par=(LayoutParams)b.getLayoutParams();
        par.leftMargin=deltaXToMove;
        b.setLayoutParams(par);
        }
    ...
    b.startAnimation(translateAnimation);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read a lot about jquery and i have a simple webservice that
I have read a lot about adding HTML5.js for IE7/8 support. Even though the
I have read a lot about this issue but mine still seems to be
Recently I have read a lot about different NoSQL databases and how they are
I've read a lot about building UI that supports multiple screen resolutions on android.
I have read a lot about soft deletes and archive and saw all the
I read a lot about GlassFish application server that it supports the whole Java
I have read a lot about the Java class loading process lately. Often I
I have googled a lot and read a lot about the leaks issue with
This should be something simple, I have read a lot about the organization browser

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.