use of android.app.FragmentTransaction in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ExpandedDesktop method removeFragment.
private void removeFragment() {
FragmentManager fragmentManager = getChildFragmentManager();
Fragment fragment = fragmentManager.findFragmentByTag(EXPANDED_DESKTOP_PREFERENCE_TAG);
if (fragment != null) {
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.remove(fragment).commit();
}
}
use of android.app.FragmentTransaction in project android_frameworks_base by ResurrectionRemix.
the class DirectoryFragment method create.
public static void create(FragmentManager fm, int type, RootInfo root, DocumentInfo doc, String query, int anim) {
final Bundle args = new Bundle();
args.putInt(Shared.EXTRA_TYPE, type);
args.putParcelable(Shared.EXTRA_ROOT, root);
args.putParcelable(Shared.EXTRA_DOC, doc);
args.putString(Shared.EXTRA_QUERY, query);
args.putParcelable(Shared.EXTRA_SELECTION, new Selection());
final FragmentTransaction ft = fm.beginTransaction();
AnimationView.setupAnimations(ft, anim, args);
final DirectoryFragment fragment = new DirectoryFragment();
fragment.setArguments(args);
ft.replace(getFragmentId(), fragment);
ft.commitAllowingStateLoss();
}
use of android.app.FragmentTransaction in project android_frameworks_base by ResurrectionRemix.
the class RootsFragment method show.
public static void show(FragmentManager fm, Intent includeApps) {
final Bundle args = new Bundle();
args.putParcelable(EXTRA_INCLUDE_APPS, includeApps);
final RootsFragment fragment = new RootsFragment();
fragment.setArguments(args);
final FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.container_roots, fragment);
ft.commitAllowingStateLoss();
}
use of android.app.FragmentTransaction in project android_frameworks_base by ResurrectionRemix.
the class SaveFragment method show.
public static void show(FragmentManager fm, String mimeType, String displayName) {
final Bundle args = new Bundle();
args.putString(EXTRA_MIME_TYPE, mimeType);
args.putString(EXTRA_DISPLAY_NAME, displayName);
final SaveFragment fragment = new SaveFragment();
fragment.setArguments(args);
final FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.container_save, fragment, TAG);
ft.commitAllowingStateLoss();
}
use of android.app.FragmentTransaction in project android_frameworks_base by ResurrectionRemix.
the class PrintActivity method showFragment.
private void showFragment(Fragment newFragment) {
FragmentTransaction transaction = getFragmentManager().beginTransaction();
Fragment oldFragment = getFragmentManager().findFragmentByTag(FRAGMENT_TAG);
if (oldFragment != null) {
transaction.remove(oldFragment);
}
if (newFragment != null) {
transaction.add(R.id.embedded_content_container, newFragment, FRAGMENT_TAG);
}
transaction.commitAllowingStateLoss();
getFragmentManager().executePendingTransactions();
}
Aggregations