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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:58:29+00:00 2026-06-06T12:58:29+00:00

I follow example from here using section listview http://lalit3686.blogspot.com/2012/05/sectionadapter.html But how can I implement

  • 0

I follow example from here using section listview
http://lalit3686.blogspot.com/2012/05/sectionadapter.html

But how can I implement adapter.notifyDataSetChanged()?

Adding listener to update the listview data:

mListView.setOnItemClickListener(new OnItemClickListener() {

        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

            Toast.makeText(SectionAdapterActivity.this, ""+position+"", Toast.LENGTH_SHORT).show();
            test();

        }
    });

I’m adding new function only for change/update value (testing only):

public void test()
{
    hashMap.clear();

    for (int i = 0; i < 3; i++) {
        hashMap.put("Mail", String.valueOf(1100 + i), 1);
    }

    for (int j = 0; j < 4; j++) {
        hashMap.put("Case", String.valueOf(2100 + j), 15);
    }
    for (int j = 0; j < 5; j++) {
        hashMap.put("File", String.valueOf(10000 + j), 20);
    }

    mListView.invalidate();
    mListView.invalidateViews();
    adapter.notifyDataSetChanged(); 

    Log.e("dada", hashMap.toString());
}}

Seems like does not work, can anyone help?

  • 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-06T12:58:30+00:00Added an answer on June 6, 2026 at 12:58 pm

    I don’t understand exactly what you are trying to achieve with calling notifyDataSetChange().

    this method is taking affect only when you change the logic data collection / database which been used by the adapter, after it has created already. in this situation – it would cause to update of the list with the new data

    if that’s what you want to do, then to use it – what you need to do is simple: just call:

    adapter.notifyDataSetChanged();
    

    and that’s it :). nothing else.

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

Sidebar

Related Questions

I'm trying to follow the example on http://developers.cloudmade.com/wiki/iphone-sdk/Create_basic_Local_Search_and_Geocoding_app . The example from svn provided
I am trying to follow what is being explained here: http://www.djangobook.com/en/2.0/chapter03/ (the confusing example
Using the repo found here: http://github.com/nkallen/screw-unit and this commit: cc41f3cf373d804b11519704faf1971370f43760 I get this screen
I am trying to use autocomplete from http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js but am getting this error. textbox
I am trying to follow this example (from p137 of Rob Pickering's Foundations of
I'm trying to follow some example code from microsofts mdn site.. var WshShell =
Trying to follow this example. (Section String sorting...) Is there anything obvious that would
I am new to maven and I am trying to follow this example but
I'm trying to follow the Auth example for Webapp2 that can be found here:
I follow the steps in the customdialog example in the documentation, but I get

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.