0

I have custom CursorAdapter in my application with custom ContentProvider. I also have service with separate thread that updates data in my ContentProvider. My problem is that when service updates data in ContentProvider and CursorAdapter updates itself my UI is slowing down. I have circle progress indicator and during those operations, its animation is choppy.

Do you have any ideas, how can I make it more smoother?

connexion20000
  • 235
  • 3
  • 16
  • Can you post the service code? I suspect that you should be updating your provider using batch operations. See if this answer applies to your situation: http://stackoverflow.com/questions/9363452/android-when-to-use-contentresolver-applybatch-or-bulkinsert/9534346#9534346 – jsmith Sep 26 '12 at 13:18
  • You were correct. This solved my problem. Add it as an answer, so I can mark it. – connexion20000 Sep 26 '12 at 19:49

1 Answers1

1

I suspect that you should be updating your provider using batch operations.

See if this answer applies to your situation: Android when to use ContentResolver applyBatch or BulkInsert

Community
  • 1
  • 1
jsmith
  • 4,847
  • 2
  • 32
  • 39