0

I am noticing that when I restartLoader, the onLoaderReset callback does not run. I also tried doing a manual reset on the Loader itself, but that didn't work either.

I did find this bug ticket, but I thought that surely it would have more attention.

I would like to mention that I am fairly certain that I have the Loaders configured properly. Everything else is working perfectly, including the other two callbacks.

Note: If anyone is curious, I am using a CursorLoader to refresh a CursorAdapter backing a ListView. I am setting the Cursor on the CursorAdapter to null in onLoaderReset, but because it doesn't get called there is a small window where the ListView's contents are stale.

theblang
  • 10,215
  • 9
  • 69
  • 120
  • CursorAdapter refreshes automatically if the content of the Uri it refers to changes – pskink Sep 24 '14 at 14:52
  • @pskink I have been using `swapCursor` to refresh, with a `Loader` to get the new `Cursor`. Is that not how I should be doing it? – theblang Sep 24 '14 at 14:58
  • are you using your custom ContentProvider? – pskink Sep 24 '14 at 15:00
  • @pskink `CommonsWare` suggests obtaining a `fresh Cursor` and calling `swapCursor` [in this answer](http://stackoverflow.com/a/1986071/1747491). That is what I am doing, so I implemented a `Loader` to obtain the `fresh Cursor`. – theblang Sep 24 '14 at 15:10

0 Answers0