コード例 #1
0
 @Override
 public void onResume() {
   super.onResume();
   Cursor cursor =
       getActivity().getContentResolver().query(ThemeColumns.CONTENT_URI, null, null, null, null);
   if (cursor != null && cursor.getCount() == 0) {
     setEmptyText(getString(R.string.no_local_theme));
   }
   if (cursor != null) {
     cursor.close();
   }
   if (mLocalCusorAdapter != null) {
     mLocalCusorAdapter.notifyDataSetChanged();
   }
 }
コード例 #2
0
 @Override
 public void onDestroy() {
   super.onDestroy();
   mLocalCusorAdapter.changeCursor(null);
 }