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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:39:27+00:00 2026-05-16T15:39:27+00:00

i try to animate a TextView on a changeText But always see only one

  • 0

i try to animate a TextView on a changeText
But always see only one direction of the animation, i only see the fadeout

What i try is: beforChange = fadeOut and onChange or after fadein

here is my code in the onCreate method of my activity:

    final Animation out = new AlphaAnimation(1.0f, 0.0f);
    out.setDuration(1000);

    final Animation in = new AlphaAnimation(0.0f, 1.0f);
    in.setDuration(1000);


    bidFirst.setAnimation(out);
    bidMiddle.setAnimation(out);
    bidLast.setAnimation(out);

    TextWatcher bidWatcher = new TextWatcher() {
      public void onTextChanged(CharSequence s, int start, int before, int count) {
        in.startNow();
        bidFirst.setAnimation(out);
        bidMiddle.setAnimation(out);
        bidLast.setAnimation(out);
      }

      public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        out.startNow();
        bidFirst.setAnimation(in);
        bidMiddle.setAnimation(in);
        bidLast.setAnimation(in);
      }

      public void afterTextChanged(Editable s) {
      }
    };
    bidFirst.addTextChangedListener(bidWatcher);
    bidMiddle.addTextChangedListener(bidWatcher);
    bidLast.addTextChangedListener(bidWatcher);

i think there is something wrong in my code but for my believe it has to work.

What i have now is: on every setText the changed Text only FadeOut but after the text has changed and never FadeIn!?

  • 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-16T15:39:27+00:00Added an answer on May 16, 2026 at 3:39 pm

    TextSwitcher is exactly what you are looking for. Just use their setInAnimation() and setOutAnimation. Than the animations will run automatically if you change the text by setText()

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

Sidebar

Related Questions

Whenever I try to animate an image with Zepto, it works fine. But I
I try to animate an image with zooming every one second, it work when
I try to call setFrame:display:animate: on my NSWindow and doesn't do anything, but if
I try to remove a view from it's superview after being animated offscreen. But
For some reason, when I try to animate textColor , it won't work. The
when i try to animate custom View (created in java code), there is no
I am get an exception when I try to animate an image through frame
Try to find a global function, to get and to put the backgroundPosition-values, but
I am using .animate to try and create a tile based game. I am
I'm trying to animate UITextField border color (fade in). Here is what I try

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.