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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:06:27+00:00 2026-05-20T21:06:27+00:00

I am having a situation where I want to update my Custom List View

  • 0

I am having a situation where I want to update my Custom List View using BaseAdapter whenever my Database is updated. I have tried calling invalidate() on this Custom List but it didn’t work, similarly I even tried having a timer to update my list after sometime, that didn’t work either. Please let me know of possible solution.

Update:

This is how I am making my custom list view

li= (ListView)findViewById(R.id.id_lv_row); 
ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); 
registerForContextMenu(li); 
li.setDivider(divcolor); 
li.setDividerHeight(2); 
li.setAdapter(new FriendsPositionAdapter(this));
  • 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-20T21:06:28+00:00Added an answer on May 20, 2026 at 9:06 pm

    Invalidate is for repainting views only, you have to tell to the List adapter (BaseAdapter) that dataset has changed.
    When the data changes, asign the new dataset to the adapter, and later call notifyDataSetChanged()…

    in order to make functional notifyDataSetChanged() the adapter data must be changed. Remember that the original data that change is not reflected automatically to the adapter.

    //here i retrieve the new list, named "beans"
    lista = (BeanList) result.getDataObject();
    Vector<Bean>beans = list.getBeanList();
    ((BeanListAdapter)listAdapter).syncData(beans);
    ((BeanListAdapter)listAdapter).notifyDataSetChanged();
    
    //now the syncData method
    public void syncData( List<PINPropiedad> newData ){
        for(Object o : newData){
            add(o);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'am having the following situation. We have a private method where I want to
i have the following situation. I'm having a really long webpage where I want
I'm having a strange situation, and I can't figure out the problem. I want
I have a weird situation. A client of mine has a website having this
I have a situation where I want to perform special processing on some Windows
Say I have a situation where I really want to use Parallel.ForEach instead of
I have the same situation as this other question , but I don't want
I am having a situation where looping through the result of LINQ is getting
I'm having a strange situation occuring where I'm able to read and save information
I am having a funny situation which I am not sure if it is

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.