getSupportActionBar().setHomeButtonEnabled(true); // mandatory since Android ICS, according to the official documentation
setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/); // always AFTER setContentView(...) ; to work around bug in its implementation
+ setBackgroundText();
+
Log_OC.d(TAG, "onCreate() end");
}
removeStickyBroadcast(intent);
Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/);
+
+ setBackgroundText();
}
}
}
+ /**
+ * Show a text message on screen view for notifying user if content is
+ * loading or folder is empty
+ */
+ private void setBackgroundText() {
+ OCFileListFragment ocFileListFragment = getListOfFilesFragment();
+ if (ocFileListFragment != null) {
+ int message = R.string.file_list_loading;
+ if (!mSyncInProgress) {
+ // In case file list is empty
+ message = R.string.file_list_empty;
+ }
+ ocFileListFragment.setMessageForEmptyList(getString(message));
+ } else {
+ Log.e(TAG, "OCFileListFragment is null");
+ }
+ }
/**
* Once the file upload has finished -> update view
synchFolderOp.execute(getAccount(), this, null, null);
setSupportProgressBarIndeterminateVisibility(true);
+
+ setBackgroundText();
}
/**
}
onTransferStateChanged(file, false, false);
}
-
+
}