Exemplo n.º 1
0
 @Override
 protected void onStartLoading() {
   super.onStartLoading();
   if (mdata != null) {
     deliverResult(mdata);
   }
   if (mdata == null) {
     forceLoad();
   }
   DBHelper.getInstance(getContext()).registerObserver(mObserver);
 }
Exemplo n.º 2
0
  @Override
  public List<Student> loadInBackground() {

    try {

      mdata = DBHelper.getInstance(getContext()).getStudent();
    } catch (Exception e) {
      e.printStackTrace();
      return null;
    }
    return mdata;
  }