Пример #1
0
  @Override
  public void refresh() {
    if (!ConnectivityUtils.hasNetwork(getActivity())) {
      if (mi != null) {
        mi.setActionView(null);
      }
      if (!ConnectivityUtils.hasNetwork(getActivity())) {
        Crouton.cancelAllCroutons();
        Crouton.showText(
            getActivity(),
            Html.fromHtml(
                getString(org.alfresco.mobile.android.foundation.R.string.error_session_nodata)),
            Style.INFO,
            (ViewGroup) (getRootView().getParent()));
      }
      refreshHelper.setRefreshComplete();
      return;
    }

    SyncContentManager.getInstance(getActivity()).sync(acc);
    if (mi != null) {
      // Display spinning wheel instead of refresh
      mi.setActionView(R.layout.app_spinning);
    }

    if (adapter != null) {
      ((SyncCursorAdapter) adapter).refresh();
      gv.setAdapter(adapter);
    }
  }
 private boolean verifyInputs(String email, String password, String repassword) {
   if (TextUtils.isEmpty(email)) {
     ViewAnimation.blink(this, ed_email);
     Crouton.cancelAllCroutons();
     AppSnackBar.showTopSnackbar(this, getString(R.string.BR_SIGN_005), Color.RED, Color.WHITE);
     return false;
   } else if (!mValidator.isValidEmail(email)) {
     ViewAnimation.blink(this, ed_email);
     Crouton.cancelAllCroutons();
     AppSnackBar.showTopSnackbar(this, getString(R.string.BR_GNL_002), Color.RED, Color.WHITE);
     return false;
   } else if (TextUtils.isEmpty(password)) {
     ViewAnimation.blink(this, ed_new_password);
     Crouton.cancelAllCroutons();
     AppSnackBar.showTopSnackbar(this, getString(R.string.BR_SIGN_002), Color.RED, Color.WHITE);
     return false;
   } else if (!mValidator.isValidPassword(password)) {
     ViewAnimation.blink(this, ed_new_password);
     Crouton.cancelAllCroutons();
     AppSnackBar.showTopSnackbar(this, getString(R.string.BR_GNL_003), Color.RED, Color.WHITE);
     return false;
   } else if (TextUtils.isEmpty(repassword)) {
     ViewAnimation.blink(this, ed_repassword);
     Crouton.cancelAllCroutons();
     AppSnackBar.showTopSnackbar(this, getString(R.string.BR_SIGN_003), Color.RED, Color.WHITE);
     return false;
   } else if (!mValidator.isPasswordsMatched(password, repassword)) {
     ViewAnimation.blink(this, ed_new_password);
     ViewAnimation.blink(this, ed_repassword);
     Crouton.cancelAllCroutons();
     AppSnackBar.showTopSnackbar(this, getString(R.string.BR_SIGN_006), Color.RED, Color.WHITE);
     return false;
   }
   return true;
 }
    @Override
    public void onDrawerOpened(View drawerView) {
      super.onDrawerOpened(drawerView);

      Crouton.cancelAllCroutons();

      baseActivity.invalidateOptionsMenu();

      if (!userLearnedDrawer) {
        userLearnedDrawer = true;
        saveUserLearnedDrawer();
      }

      navigationDrawerCounterListener.onUpdateCountUnreadDialogs(getCountUnreadDialogs());
    }
 @Override
 protected void onDestroy() {
   super.onDestroy();
   Crouton.cancelAllCroutons();
 }
Пример #5
0
 @Override
 protected void onPause() {
   super.onPause();
   Crouton.cancelAllCroutons();
 }
Пример #6
0
 /** Clean the file cache when root activity exits. */
 @Override
 protected void onDestroy() {
   super.onDestroy();
   if (Constants.DEBUG) Log.d(getLogTag(), "onDestroy");
   Crouton.cancelAllCroutons();
 }
Пример #7
0
 public void onDestroy() {
   Crouton.cancelAllCroutons();
   super.onDestroy();
 }
Пример #8
0
 public void onBackPressed() {
   Crouton.cancelAllCroutons();
   super.onBackPressed();
 }
Пример #9
0
  @Override
  public void onDestroy() {
    super.onDestroy();

    Crouton.cancelAllCroutons();
  }