Search in sources :

Example 81 with FragmentManager

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";
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) Fragment(android.app.Fragment)

Example 82 with FragmentManager

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();
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) Fragment(android.app.Fragment)

Example 83 with FragmentManager

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();
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) Fragment(android.app.Fragment)

Example 84 with FragmentManager

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;
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction)

Example 85 with FragmentManager

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();
    }
}
Also used : FragmentManager(android.app.FragmentManager) ProgressDialogFragment(com.fsck.k9.fragment.ProgressDialogFragment) ConfirmationDialogFragment(com.fsck.k9.fragment.ConfirmationDialogFragment) DialogFragment(android.app.DialogFragment)

Aggregations

FragmentManager (android.app.FragmentManager)177 FragmentTransaction (android.app.FragmentTransaction)84 Fragment (android.app.Fragment)51 Bundle (android.os.Bundle)22 DocumentInfo (com.android.documentsui.model.DocumentInfo)20 DialogFragment (android.app.DialogFragment)15 RootInfo (com.android.documentsui.model.RootInfo)15 ActionBar (android.support.v7.app.ActionBar)12 Intent (android.content.Intent)11 File (java.io.File)6 MediaRouter (android.media.MediaRouter)5 Uri (android.net.Uri)5 StorageManager (android.os.storage.StorageManager)5 VolumeInfo (android.os.storage.VolumeInfo)5 MenuItem (android.view.MenuItem)5 IOException (java.io.IOException)5 Toolbar (android.support.v7.widget.Toolbar)4 View (android.view.View)4 DialogInterface (android.content.DialogInterface)3 ViewGroup (android.view.ViewGroup)3