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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:29:48+00:00 2026-06-09T19:29:48+00:00

I am performing a fade effect on a button. AnimationSet set = new AnimationSet(true);

  • 0

I am performing a fade effect on a button.

AnimationSet set = new AnimationSet(true);
Animation animation2 = new AlphaAnimation((float) 0, 1);
animation2.setDuration(1500);
animation2.setRepeatMode(0);
set.addAnimation(animation2);
set.setFillAfter(true); // leaves the animation in its final status
btn.startAnimation(set);

I am using the setFillAfter(true) option to leave the button visible. That works fine. Now I would like to perform the animation again, but can’t never set again my button to be invisible on the screen, unless I restart the app. (alos tried invalidate() with no success…)

Any idea would be “so” welcome.

Thanks in advance!
Paul

  • 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-09T19:29:50+00:00Added an answer on June 9, 2026 at 7:29 pm

    Thank you for you help. Actually I found the answer on the developpers doc. There is a big difference between “View animation” (which I tried to do) and “Property Animation”. Basically View animation redraws an image of the view you are working on, but does not affect the original view. So If you translate your view from example, on the screen the view is moved but programatically it remained in its initial state and will catch events in its original position.

    Here is the explanation:

    How Property Animation Differs from View Animation The view animation
    system provides the capability to only animate View objects, so if you
    wanted to animate non-View objects, you have to implement your own
    code to do so. The view animation system is also constrained in the
    fact that it only exposes a few aspects of a View object to animate,
    such as the scaling and rotation of a View but not the background
    color, for instance.

    Another disadvantage of the view animation system is that it only
    modified where the View was drawn, and not the actual View itself. For
    instance, if you animated a button to move across the screen, the
    button draws correctly, but the actual location where you can click
    the button does not change, so you have to implement your own logic to
    handle this.

    With the property animation system, these constraints are completely
    removed, and you can animate any property of any object (Views and
    non-Views) and the object itself is actually modified. The property
    animation system is also more robust in the way it carries out
    animation. At a high level, you assign animators to the properties
    that you want to animate, such as color, position, or size and can
    define aspects of the animation such as interpolation and
    synchronization of multiple animators.

    The view animation system, however, takes less time to setup and
    requires less code to write. If view animation accomplishes everything
    that you need to do, or if your existing code already works the way
    you want, there is no need to use the property animation system. It
    also might make sense to use both animation systems for different
    situations if the use case arises.

    http://developer.android.com/guide/topics/graphics/prop-animation.html

    For my case I used Property animation and it matches all my animation needs. Thank you for your support!
    🙂

    Paul

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

Sidebar

Related Questions

When performing some custom painting on a button's Graphics2D object, I get the following
When performing UPDATE and INSERT queries using Zend_Db, I frequently need to set values
For couple of hobby projects of mine, I've been performing form transitions (fade-in/out, slide-left/right)
I am performing a curl request to a page. I have set both 'CURLOPT_TIMEOUT'
After performing some operations I am getting a set of records. Example: a b
I am performing an insertion of a new row from an ASP form into
When performing a MemberwiseClone of an array of value types: var arr = new
When performing many disk operations, does multithreading help, hinder, or make no difference? For
While performing a conditional DELETE operation in one of my InnoDB tables, which apparently
While performing some upcoming maintenance, I'm going to have to redirect all site traffic

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.