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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:45:30+00:00 2026-05-24T03:45:30+00:00

In iOS, there is a very easy and powerful facility to animate the addition

  • 0

In iOS, there is a very easy and powerful facility to animate the addition and removal of UITableView rows, here’s a clip from a youtube video showing the default animation. Note how the surrounding rows collapse onto the deleted row. This animation helps users keep track of what changed in a list and where in the list they were looking at when the data changed.

Since I’ve been developing on Android I’ve found no equivalent facility to animate individual rows in a TableView. Calling notifyDataSetChanged() on my Adapter causes the ListView to immediately update its content with new information. I’d like to show a simple animation of a new row pushing in or sliding out when the data changes, but I can’t find any documented way to do this. It looks like LayoutAnimationController might hold a key to getting this to work, but when I set a LayoutAnimationController on my ListView (similar to ApiDemo’s LayoutAnimation2) and remove elements from my adapter after the list has displayed, the elements disappear immediately instead of getting animated out.

I’ve also tried things like the following to animate an individual item when it is removed:

@Override
protected void onListItemClick(ListView l, View v, final int position, long id) {
    Animation animation = new ScaleAnimation(1, 1, 1, 0);
    animation.setDuration(100);
    getListView().getChildAt(position).startAnimation(animation);
    l.postDelayed(new Runnable() {
        public void run() {
            mStringList.remove(position);
            mAdapter.notifyDataSetChanged();
        }
    }, 100);
}

However, the rows surrounding the animated row don’t move position until they jump to their new positions when notifyDataSetChanged() is called. It appears ListView doesn’t update its layout once its elements have been placed.

While writing my own implementation/fork of ListView has crossed my mind, this seems like something that shouldn’t be so difficult.

Thanks!

  • 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-24T03:45:31+00:00Added an answer on May 24, 2026 at 3:45 am
    Animation anim = AnimationUtils.loadAnimation(
                         GoTransitApp.this, android.R.anim.slide_out_right
                     );
    anim.setDuration(500);
    listView.getChildAt(index).startAnimation(anim );
    
    new Handler().postDelayed(new Runnable() {
    
        public void run() {
    
            FavouritesManager.getInstance().remove(
                FavouritesManager.getInstance().getTripManagerAtIndex(index)
            );
            populateList();
            adapter.notifyDataSetChanged();
    
        }
    
    }, anim.getDuration());
    

    for top-to-down animation use :

    <set xmlns:android="http://schemas.android.com/apk/res/android">
            <translate android:fromYDelta="20%p" android:toYDelta="-20"
                android:duration="@android:integer/config_mediumAnimTime"/>
            <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
                android:duration="@android:integer/config_mediumAnimTime" />
    </set>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there some free and easy to use 3D library for iOS (and Android)
Is there an Android equivalent of didUpdateHeading (from iOS) ? Any sample code to
Is there a way to terminate a phone call from an iOS app? The
I'm still very new to iOS developing. In fact, if there is a super
OK, there are very few options to emulate the splash video in iOS. All
On iOS, a UINavigationController is useful and very easy to use to push and
In iOS is there any way to tell, when the touch ends, if it
I am looking for an equivalent pattern in multi-threading in iOS as there is
Is there any way within the iOS SDK for an app to delete itself?
Is there any way to stop animation in iOS 3 ? I know about:

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.