use of com.owncloud.android.ui.controller.TransferProgressController in project android by owncloud.
the class PreviewAudioFragment method onActivityCreated.
/**
* {@inheritDoc}
*/
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Log_OC.v(TAG, "onActivityCreated");
OCFile file;
if (savedInstanceState == null) {
Bundle args = getArguments();
file = args.getParcelable(PreviewAudioFragment.EXTRA_FILE);
setFile(file);
mAccount = args.getParcelable(PreviewAudioFragment.EXTRA_ACCOUNT);
mSavedPlaybackPosition = args.getInt(PreviewAudioFragment.EXTRA_PLAY_POSITION);
mAutoplay = args.getBoolean(PreviewAudioFragment.EXTRA_PLAYING);
} else {
file = savedInstanceState.getParcelable(PreviewAudioFragment.EXTRA_FILE);
setFile(file);
mAccount = savedInstanceState.getParcelable(PreviewAudioFragment.EXTRA_ACCOUNT);
mSavedPlaybackPosition = savedInstanceState.getInt(PreviewAudioFragment.EXTRA_PLAY_POSITION);
mAutoplay = savedInstanceState.getBoolean(PreviewAudioFragment.EXTRA_PLAYING);
}
if (file == null) {
throw new IllegalStateException("Instanced with a NULL OCFile");
}
if (mAccount == null) {
throw new IllegalStateException("Instanced with a NULL ownCloud Account");
}
if (!file.isDown()) {
throw new IllegalStateException("There is no local file to preview");
}
if (!file.isAudio()) {
throw new IllegalStateException("Not an audio file");
}
extractAndSetCoverArt(file);
mProgressController = new TransferProgressController(mContainerActivity);
mProgressController.setProgressBar(mProgressBar);
}
use of com.owncloud.android.ui.controller.TransferProgressController in project android by owncloud.
the class PreviewImageFragment method onActivityCreated.
/**
* {@inheritDoc}
*/
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mProgressController = new TransferProgressController(mContainerActivity);
mProgressController.setProgressBar(mProgressBar);
mProgressController.hideProgressBar();
if (savedInstanceState != null) {
if (!mIgnoreFirstSavedState) {
OCFile file = savedInstanceState.getParcelable(PreviewImageFragment.EXTRA_FILE);
setFile(file);
} else {
mIgnoreFirstSavedState = false;
}
}
mAccount = getArguments().getParcelable(PreviewAudioFragment.EXTRA_ACCOUNT);
if (mAccount == null) {
throw new IllegalStateException("Instanced with a NULL ownCloud Account");
}
if (getFile() == null) {
throw new IllegalStateException("Instanced with a NULL OCFile");
}
if (!getFile().isDown()) {
throw new IllegalStateException("There is no local file to preview");
}
}
use of com.owncloud.android.ui.controller.TransferProgressController in project android by owncloud.
the class PreviewTextFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedState) {
super.onActivityCreated(savedState);
mProgressController = new TransferProgressController(mContainerActivity);
mProgressController.setProgressBar(mProgressBar);
}
use of com.owncloud.android.ui.controller.TransferProgressController in project android by owncloud.
the class FileDetailFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
mProgressController = new TransferProgressController((ComponentsGetter) getActivity());
ProgressBar progressBar = (ProgressBar) mView.findViewById(R.id.fdProgressBar);
DisplayUtils.colorPreLollipopHorizontalProgressBar(progressBar);
mProgressController.setProgressBar(progressBar);
}
use of com.owncloud.android.ui.controller.TransferProgressController in project android by owncloud.
the class FileDownloadFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedState) {
super.onActivityCreated(savedState);
mProgressController = new TransferProgressController(mContainerActivity);
mProgressController.setProgressBar(mProgressBar);
}
Aggregations