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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:51:05+00:00 2026-06-09T15:51:05+00:00

I use my ArrayAdapter expanded getView method. I change CheckBox but the ListView does

  • 0

I use my ArrayAdapter expanded getView method.
I change CheckBox but the ListView does not refresh

my source

@Override
    public View getView(int position, View convertView, ViewGroup parent) {

        // Planet to display
        UrlItem urlItem = (UrlItem) this.getItem(position);
        ViewHolder viewHolder = null;

        if (convertView == null) {

            convertView = inflater.inflate(R.layout.database_table_item, null);
            viewHolder = new ViewHolder();
            viewHolder.checkbox = (CheckBox) convertView
                    .findViewById(R.id.checkBox1);



            viewHolder.checkbox
                    .setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {

                        public void onCheckedChanged(CompoundButton buttonView,
                                boolean isChecked) {

                            int getPosition = (Integer) buttonView.getTag();
                            DatabaseTable.setPosition(getPosition);


                            for (int i = 0; i < UrlItems.size(); i ++ ) {

                                UrlItems.get(i).setUse(false);

                            }

                            UrlItems.get(getPosition).setUse(isChecked);


                        }
                    });

How can I refresh the list after changes ??

for your information in the manifest set

<activity
            android:name=".DatabaseTable"
            android:label="database_table" android:windowSoftInputMode="adjustPan" >

See the link for the upgrade using the button “selectAll” I have exact same idea but without the button selectAll

http://pastebin.com/PgNeDnXq

  • 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-09T15:51:07+00:00Added an answer on June 9, 2026 at 3:51 pm
    adapter.notifyDataSetChanged(); // to notify the adapter that your data has been updated
    

    Note: If you get any errors with the above line, you could try the following code (where mListView is the name of my ListView object)

    ((BaseAdapter) mListView.getAdapter()).notifyDataSetChanged(); 
    

    Another way would be to invalidate the List so that it is redrawn form the updated data set once again.

    mListView=(ListView) findViewById(R.id.MyListView);
    mListView.invalidate();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom ArrayAdapter I use to manage my ListView: public class FilesAdapter
I have an ArrayAdapter that I use to fill a listview, but I'm unable
I have a ListView that I want to use with an ArrayAdapter to add
In android, I usually use MyAdapter extends ArrayAdapter to create view for the ListView
I have made a ListView with an ArrayAdapter. It works. But I had to
I'm trying to use in my Android Application the notifyDataSetChanged() method for an ArrayAdapter
I use an ArrayAdapter to show items in a ListView. Every row in this
I'm trying to create a custom ArrayAdapter to use for my ListFragment . Right
I would like to use a SimpleAdapter instead of customizing an ArrayAdapter. Everything is
In my ArrayAdapter class I capture the context passed in. Then int the getView

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.