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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:41:53+00:00 2026-05-26T23:41:53+00:00

I have a ListView of items with checkboxes. I have a custom CursorAdapter that

  • 0

I have a ListView of items with checkboxes.

I have a custom CursorAdapter that checks the checkboxes if the the field value is “1” in it’s get View method.

When I click on the list item in the listview, it checks the checkbox and updates the field to “1”. The problem I have is when I call the changecursor method on my custom adapter, it reloads everything and points to the first item instead of the item I just clicked on.

In the changeCursor method I have the following:

    public void changeCursor(Cursor cursor) {
    super.changeCursor(cursor);
    init(cursor);
    notifyDataSetChanged();
}

Is there a way to maintain the position or a workaround to reload the cursor without making it jump to the first item?

  • 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-26T23:41:54+00:00Added an answer on May 26, 2026 at 11:41 pm

    You basically need some data structure to keep track of checked items. you can use boolean array in your custom adapter.

    for more info refer this link Custom listview with checkbox problem

    listview with checkbox

    if you are looking for an example try this http://appfulcrum.com/?p=281 tutorial which solves the checkbox problem in listview using shared preferences.

    Thanks

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

Sidebar

Related Questions

I have list view with custom array adapter. I want to get items click
I have a listview with 200 items. I use a custom view for each
So I have a custom ListView object. The list items have two textviews stacked
I have a list view full of items that contain multiple widgets each such
I have list view with custom row layout (list_row.xml) that contains CheckBox element: <TableLayout
I have an android app that displays a list of items in a Custom
I have a ListView that uses a custom layout that has 5 child View
I have a ListView, checkboxes = true, View = List. On the start of
I have a listview with several items that are created dynamically, each has two
I have a ListView that I am populating with items from an ObservableCollection .

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.