use of android.app.FragmentManager in project cloudrail-si-android-sdk by CloudRail.
the class MainActivity method onToken.
@Override
public void onToken(String[] token) {
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
Fragment content = EditStatus.newInstance(token);
fragmentTransaction.replace(R.id.content, content);
fragmentTransaction.commit();
mCurrentFragment = "EditStatus";
}
use of android.app.FragmentManager in project cloudrail-si-android-sdk by CloudRail.
the class MainActivity method browseToBucket.
private void browseToBucket(String service, String bucketName, String bucketId) {
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
Fragment content = FileViewer.newInstance(service, bucketName, bucketId);
fragmentTransaction.replace(R.id.content, content, "fileViewer");
fragmentTransaction.commit();
}
use of android.app.FragmentManager in project cloudrail-si-android-sdk by CloudRail.
the class FileViewer method navigateToService.
private void navigateToService(int service) {
spe = sp.edit();
spe.putInt("service", service);
spe.apply();
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
Fragment content = Files.newInstance(service);
fragmentTransaction.replace(R.id.content, content, "files");
fragmentTransaction.commit();
}
use of android.app.FragmentManager in project run-wallet-android by runplay.
the class UiManager method openFragment.
public static boolean openFragment(Activity activity, Class<? extends Fragment> fragment) {
if (activity != null && !activity.isDestroyed()) {
FragmentManager fm = activity.getFragmentManager();
FragmentTransaction tr = fm.beginTransaction();
tr.replace(R.id.container, Fragment.instantiate(activity, fragment.getName()), fragment.getClass().getCanonicalName());
tr.commit();
}
return true;
}
use of android.app.FragmentManager in project k-9 by k9mail.
the class MessageViewFragment method removeDialog.
private void removeDialog(int dialogId) {
FragmentManager fm = getFragmentManager();
if (fm == null || isRemoving() || isDetached()) {
return;
}
// Make sure the "show dialog" transaction has been processed when we call
// findFragmentByTag() below. Otherwise the fragment won't be found and the dialog will
// never be dismissed.
fm.executePendingTransactions();
DialogFragment fragment = (DialogFragment) fm.findFragmentByTag(getDialogTag(dialogId));
if (fragment != null) {
fragment.dismiss();
}
}
Aggregations