use of androidx.fragment.app.FragmentTransaction in project orgzly-android by orgzly.
the class DisplayManager method displaySavedSearches.
public static void displaySavedSearches(FragmentManager fragmentManager) {
if (isFragmentDisplayed(fragmentManager, SavedSearchesFragment.getFRAGMENT_TAG()) != null) {
return;
}
Fragment fragment = SavedSearchesFragment.getInstance();
FragmentTransaction t = fragmentManager.beginTransaction().setCustomAnimations(R.anim.fragment_enter, R.anim.fragment_exit, R.anim.fragment_enter, R.anim.fragment_exit).addToBackStack(null).replace(R.id.single_pane_container, fragment, SavedSearchesFragment.getFRAGMENT_TAG());
t.commit();
}
use of androidx.fragment.app.FragmentTransaction in project k-9 by k9mail.
the class AccountSetupCheckSettings method showDialogFragment.
private void showDialogFragment(int dialogId, String customMessage) {
if (mDestroyed) {
return;
}
mProgressBar.setIndeterminate(false);
DialogFragment fragment;
if (dialogId == R.id.dialog_account_setup_error) {
fragment = ConfirmationDialogFragment.newInstance(dialogId, getString(R.string.account_setup_failed_dlg_title), customMessage, getString(R.string.account_setup_failed_dlg_edit_details_action), getString(R.string.account_setup_failed_dlg_continue_action));
} else {
throw new RuntimeException("Called showDialog(int) with unknown dialog id.");
}
FragmentTransaction ta = getSupportFragmentManager().beginTransaction();
ta.add(fragment, getDialogTag(dialogId));
ta.commitAllowingStateLoss();
// TODO: commitAllowingStateLoss() is used to prevent https://code.google.com/p/android/issues/detail?id=23761
// but is a bad...
// fragment.show(ta, getDialogTag(dialogId));
}
use of androidx.fragment.app.FragmentTransaction in project Timber by naman14.
the class NavigationUtils method navigateToArtist.
@TargetApi(21)
public static void navigateToArtist(Activity context, long artistID, Pair<View, String> transitionViews) {
FragmentTransaction transaction = ((AppCompatActivity) context).getSupportFragmentManager().beginTransaction();
Fragment fragment;
transaction.setCustomAnimations(R.anim.activity_fade_in, R.anim.activity_fade_out, R.anim.activity_fade_in, R.anim.activity_fade_out);
fragment = ArtistDetailFragment.newInstance(artistID, false, null);
transaction.hide(((AppCompatActivity) context).getSupportFragmentManager().findFragmentById(R.id.fragment_container));
transaction.add(R.id.fragment_container, fragment);
transaction.addToBackStack(null).commit();
}
use of androidx.fragment.app.FragmentTransaction in project android by owncloud.
the class FolderPickerActivity method createFragments.
private void createFragments() {
OCFileListFragment listOfFiles = OCFileListFragment.newInstance(true, FileListOption.ALL_FILES, true, true, false);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(R.id.fragment_container, listOfFiles, TAG_LIST_OF_FOLDERS);
transaction.commit();
}
use of androidx.fragment.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);
}
}
Aggregations