I'm using Android Compatibility Library in my project. I've set up ListFragment as described in the DevGuide ( http://developer.android.com/reference/android/app/Fragment.html ), and using a simple CursorLoader Christian made be used without content provider ( Usage CursorLoader without ContentProvider ). The question is where, in my ListFragment / parent Activity, should I open database, return the Cursor, create Adapter and setListAdapter? So in my app, I have TitlesFragment, DetailsFragment, FragmentLayoutActivity, DetailsLayoutActivity. Is the best practice... to open database in ListFragment's onActivityCreated and close it in ListFragment's onDestroy like in code sample below @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); // Open database playersDatabaseHelper = new PlayersDBAdapter(getActivity()); playersDatabaseHelper.open(); getLoaderManager()...
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update