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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:06:51+00:00 2026-06-08T09:06:51+00:00

I am trying to reload the list view when the data has changed. But

  • 0

I am trying to reload the list view when the data has changed. But its not working.Here is the code I am using

localPits.clear();//
this.adapter.clear();
//Fetch new data and update the list
this.localPits.addAll(pl);
this.adapter.notifyDataSetChanged();
this.lst_Pits.invalidate();

Each time I call this portion of code existing values are successfully removed. But new values are not loaded in the list view.

How can I do this in android?
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-06-08T09:06:52+00:00Added an answer on June 8, 2026 at 9:06 am

    It’s not terribly clear, but I suspect the new values aren’t being loaded because you’re clearing the adapter without updating it.

    Your 2nd line: this.adapter.clear();

    You need to update and add the adapter before you call invalidate(). Or, at least, that’s as far as I can gather.

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

Sidebar

Related Questions

I'm trying to reload web application from ant. but I got error not found:
This is a followup from here . I am trying to reload a pdf
Using a segment control I'm trying to reload 2 UIPickerViews with a new array
I'm using jquery.mobile-1.0.1. I'm trying to make the page reload when clicking on the
I am trying to debug the reason why my ajax get/post is not working
I am trying to reload the fresh posts using jQuery. As far as I
I am trying to store an NSMutableArray of images using persistive storage but it
I'm working on a website where one of the pages has a list of
Im trying to reload a page after the response from the facebook api. With
When I am trying to reload the symbol for kernel32.dll, the windbg always complain

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.