i have a question, I write my sqlite db class, my sqlite db helper class, and a main activity where i insert fragment. In my fragment i populate listview with this code:
databaseHelper = new DBTicketHelper(this.getActivity());
cursor = databaseHelper.getTicket("Draft", param1, param2);
mListView = (SwipeMenuListView) rootView.findViewById(R.id.listViewticketOutBox);
mAdapter = new CursorAdapterTicketOutboxDraft(this.getActivity(), cursor);
mListView.setAdapter(mAdapter);
where getTicket is a methode that executa a query like this:
public Cursor getTicket (String myState, String param1, String param2)
{
return getReadableDatabase().rawQuery("SELECT * FROM .......);
}
It works fine and the listview is populate perfectly. My listview is swipelist, similar iOS swipe cell so the view and the data in the view changed frequently, for example when user deleted row or update it. Since startManagingCursor() is now deprecated, i would use CursorLoader lo load data , but i wouldn't use content provider, and i wouldn't rewrite my dbHelper and my db. I can do it or i must change my classes?? Honestly, i don't' understand how to use CursorLoader with cursor and how to implement my code with it. Can you help me to resolve this problem?? I know ,maybe, that my question in similar to others, but the others answers don't help me. Sorry for my english and thank you