use of android.support.v4.app.FragmentTransaction in project android by owncloud.
the class FileActivity method showLoadingDialog.
/**
* Show loading dialog
*/
public void showLoadingDialog(int messageId) {
// grant that only one waiting dialog is shown
dismissLoadingDialog();
// Construct dialog
Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
if (frag == null) {
Log_OC.d(TAG, "show loading dialog");
LoadingDialog loading = LoadingDialog.newInstance(messageId, false);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
loading.show(ft, DIALOG_WAIT_TAG);
fm.executePendingTransactions();
}
}
use of android.support.v4.app.FragmentTransaction in project android by owncloud.
the class FolderPickerActivity method createFragments.
private void createFragments() {
OCFileListFragment listOfFiles = OCFileListFragment.newInstance(true, true, false);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(R.id.fragment_container, listOfFiles, TAG_LIST_OF_FOLDERS);
transaction.commit();
}
use of android.support.v4.app.FragmentTransaction in project android by owncloud.
the class LogHistoryActivity method showLoadingDialog.
/**
* Show loading dialog
*/
public void showLoadingDialog() {
// Construct dialog
LoadingDialog loading = LoadingDialog.newInstance(R.string.log_progress_dialog_text, false);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
loading.show(ft, DIALOG_WAIT_TAG);
}
use of android.support.v4.app.FragmentTransaction in project android by owncloud.
the class FileActivity method showUntrustedCertDialog.
/**
* Show untrusted cert dialog
*/
public void showUntrustedCertDialog(RemoteOperationResult result) {
// Show a dialog with the certificate info
FragmentManager fm = getSupportFragmentManager();
SslUntrustedCertDialog dialog = (SslUntrustedCertDialog) fm.findFragmentByTag(DIALOG_UNTRUSTED_CERT);
if (dialog == null) {
dialog = SslUntrustedCertDialog.newInstanceForFullSslError((CertificateCombinedException) result.getException());
FragmentTransaction ft = fm.beginTransaction();
dialog.show(ft, DIALOG_UNTRUSTED_CERT);
}
}
use of android.support.v4.app.FragmentTransaction in project android by owncloud.
the class FileDisplayActivity method cleanSecondFragment.
protected void cleanSecondFragment() {
Fragment second = getSecondFragment();
if (second != null) {
FragmentTransaction tr = getSupportFragmentManager().beginTransaction();
tr.remove(second);
tr.commit();
}
updateFragmentsVisibility(false);
updateActionBarTitleAndHomeButton(null);
}
Aggregations