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 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

I try Request.Form.Set(k, v) but it's throwing exception Collection is read-only
I try to add an addons system to my Windows.Net application using Reflection; but
I try to animate a DependencyProperty from a value to a target value (in
when i try to animate custom View (created in java code), there is no
For some reason, when I try to animate textColor , it won't work. The
I know its probably possible, but is it practical and doable to try and
Is there a way to test if a collection is already initialized? try-catch only?
I know its probably possible, but is it practical and doable to try and
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
try { ... } catch (SQLException sqle) { String theError = (sqle).getSQLState(); ... }

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.