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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:21:38+00:00 2026-06-15T14:21:38+00:00

I have been searching for ages and trying for months. I can NEVER get

  • 0

I have been searching for ages and trying for months. I can NEVER get my views (ANY view) to invalidate. What’s the problem here, can anyone please tell me? And can anyone tell me how to use these invalidate methods. Thanks in advance!

                if(result.equals("true"))
                {
                    View row = invoices.getChildAt(info.position);
                    //TextView bgr = (TextView) row.findViewById(R.id.status);
                    //bgr.setBackgroundResource(R.color.blue);
                    //row.setVisibility(View.GONE);

                    Animation anim = AnimationUtils.loadAnimation(Invoices.this, R.anim.down_to_top);
                    anim.setDuration(500);
                    invoices.getChildAt(info.position).startAnimation(anim );
                    final int row_pos = info.position;

                    new Handler().postDelayed(new Runnable() {

                        public void run() {

                            /*row.getInstance().remove(
                                FavouritesManager.getInstance().getTripManagerAtIndex(info.position)
                            );*/
                            ListView invoices = (ListView) findViewById(R.id.allInvoices);
                            View row = invoices.getChildAt(row_pos);
                            row.setVisibility(View.GONE);
                            getAllInvoices();
                            myAdapter.notifyDataSetChanged();

                        }

                    }, anim.getDuration());

                    Toast.makeText(getApplicationContext(), "Deleted!", Toast.LENGTH_SHORT).show();
                }

update:
This is what I got now. It removes the view and animates correctly, but it still doesn’t invalidate?

                            ListView invoices = (ListView) findViewById(R.id.allInvoices);
                            View row = invoices.getChildAt(row_pos);
                            HashMap<String, String> lRow = invoice_items.get(row_pos);
                            lRow.remove(row);
                            row.setVisibility(View.GONE);
                            myAdapter.notifyDataSetChanged();
  • 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-15T14:21:39+00:00Added an answer on June 15, 2026 at 2:21 pm

    The reason why the call notifyDataSetChanged is not working, is because the data set is not changed.

    Inside your Handler, you alter the layout of the ListView itself. The ListView is not more than a representation of an Adapter, which holds data.

    To understand how it works, this post will explain it.

    Applying that on your code would output something like this: (PSUEDO)

    Handler {
        lRow = mAdapter.get(row_pos);
        lRow.setVisibilty(false); // visibility is a flag of the row object
        mAdapter = notifyDataSetChanged();
    }
    

    inside Adapter:

    getView() {
       if (row.getVisibility){
           // do stuff
       } else {
           // do other stuff 
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been searching for ages for a simple guide to this but can't
I've been searching for ages and can't find this precise problem, but feel free
I have been searching around for ages trying to find a solution to my
I have been searching for quite a bit now but I have never been
I have been searching for an answer and trying out stuff for days now
I have been searching around for an answer to this but I can't seem
I have been searching for a way to get the json data from a
I have been searching online for awhile, trying to find the best way to
I have been searching for any documentation on how to exclude files for visual
Just a quick question, I've been searching for ages on Google. I have a

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.