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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:26:15+00:00 2026-06-14T07:26:15+00:00

Hi so I have a CursorAdapter which maps to some items inthe database which

  • 0

Hi so I have a CursorAdapter which maps to some items inthe database which look like this

gameid|type|picurl|currPlayer|creator

The gameid is a unique id for each game for which I have 2 types. A Player game and a bot game. if the game is a bot game then picurl/currPlayer/creator will be null. Here is my adapter code.

Here is my code: http://pastebin.com/61KZbir1

The problem I am having is that in the initial load sometimes a couple images don’t show but when I scroll they do. In addition to this the bot games show the wrong text and image sometimes, but again when i scroll they fix themselves. One thing I did that fixed this was when I am inserting all the data into the table right now I am unregistering the content observer which updates the ui and re-registering it after i am done inserting then calling the method once to update the ui. The method is in the bottom of the pastebin called refreshGamesList(). But when I don’t unregister the content observer for the deletes/inserts the view shows incorrectly at first but then it gets more callbacks and it fixes itself with those callbacks. I have looked everywhere for a solution and haven’t found anything.

  • 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-14T07:26:16+00:00Added an answer on June 14, 2026 at 7:26 am

    I have fixed it finally! The problem was mainly firing off tasks from my bindview was bad design I think, I moved all the queries I was doing from an asynctask in the bindview to an asynctask in the ui thread (activity) which I then used a matrixcursor and constructed a custom cursor with the data i needed from the other table. I passed the matrixcursor to my adapter and changed having my lazyloader directly manipulating the imageview i was passing to it to just having it call adapter.notiftdatasetchanged() which worked much better. Basically I reworked a lot of the code, because my hunch was that it was firing off a lot of asynctasks from bindview which was screwing everything up so I moved it to the ui thread where it would just be called once and correctly. I think the GC involved in cursor adapter sometimes calls newview/bindview in weird ways and so firing off an asynctask everytime the bindview is called can result in view inconsistencies.

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

Sidebar

Related Questions

I have a ListView which is populated using a CursorAdapter. I'd also like to
I have an ListActivity which use data from DB.. setListAdapter(new CursorAdapter(myCursor)); This view have
I have a nicely working custom CursorAdapter with customized ListView. This view allows the
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I'm developing an app which downloads a json objects into database,this is done so
I have a ListView which uses a CursorAdatper as its adapter. I would like
I have this class, that gets the data from the database and shows in
I have created a listview which displays all the people in the database. But

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.