use of com.owncloud.android.ui.fragment.UploadListFragment in project android by owncloud.
the class UploadListActivity method createUploadListFragment.
private void createUploadListFragment() {
UploadListFragment uploadList = new UploadListFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(R.id.upload_list_fragment, uploadList, TAG_UPLOAD_LIST_FRAGMENT);
transaction.commit();
}
use of com.owncloud.android.ui.fragment.UploadListFragment in project android by owncloud.
the class UploadListActivity method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
boolean retval = true;
UploadsStorageManager storageManager = null;
UploadListFragment uploadListFragment = (UploadListFragment) getSupportFragmentManager().findFragmentByTag(TAG_UPLOAD_LIST_FRAGMENT);
switch(item.getItemId()) {
case android.R.id.home:
if (isDrawerOpen()) {
closeDrawer();
} else {
openDrawer();
}
case R.id.action_retry_uploads:
FileUploader.UploadRequester requester = new FileUploader.UploadRequester();
requester.retryFailedUploads(this, null, null);
break;
case R.id.action_clear_failed_uploads:
storageManager = new UploadsStorageManager(getContentResolver());
storageManager.clearFailedButNotDelayedForWifiUploads();
uploadListFragment.updateUploads();
break;
case R.id.action_clear_successfull_uploads:
storageManager = new UploadsStorageManager(getContentResolver());
storageManager.clearSuccessfulUploads();
uploadListFragment.updateUploads();
break;
case R.id.action_clear_finished_uploads:
storageManager = new UploadsStorageManager(getContentResolver());
storageManager.clearAllFinishedButNotDelayedForWifiUploads();
uploadListFragment.updateUploads();
break;
default:
retval = super.onOptionsItemSelected(item);
}
return retval;
}
Aggregations