@Override public void gDriveConnected(final boolean connected, final boolean canceled) { mPullToRefreshLayout.setRefreshing(false); if (connected) { statusText.setText(R.string.gDriveConnected); gDrive.getListOfBackups(GDriveBackupsAdapter); } else if (gDrive.isError()) { GDriveBackupsAdapter.clear(); statusText.setText(gDrive.getErrorMessage()); } else { GDriveBackupsAdapter.clear(); statusText.setText(R.string.gDriveDisconnected); } getActivity().invalidateOptionsMenu(); }