This method is just bad design. You shouldn't replace adapter anytime its content changed. Instead you should change cursor in adapter. But you obviously have to set adapter during onCreate() method.