use of android.app.FragmentManager in project android_frameworks_base by ResurrectionRemix.
the class BaseActivity method reloadSearch.
private void reloadSearch(String query) {
FragmentManager fm = getFragmentManager();
RootInfo root = getCurrentRoot();
DocumentInfo cwd = getCurrentDirectory();
DirectoryFragment.reloadSearch(fm, root, cwd, query);
}
use of android.app.FragmentManager 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.FragmentManager in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ActionListViewSettings method onDestroyView.
@Override
public void onDestroyView() {
super.onDestroyView();
if (mAdditionalFragmentAttached) {
FragmentManager fragmentManager = getFragmentManager();
Fragment fragment = fragmentManager.findFragmentById(R.id.fragment_container);
if (fragment != null && !fragmentManager.isDestroyed()) {
fragmentManager.beginTransaction().remove(fragment).commit();
}
}
}
use of android.app.FragmentManager in project android_frameworks_base by ResurrectionRemix.
the class SharedLibraryMain method ensureVersion.
/**
* Check that the library's version is at least the given minimum version,
* displaying a dialog to have the user install an update if that is not true.
* The dialog is displayed as a DialogFragment in your activity if a newer
* version is needed. If a newer version is needed, false is returned.
*/
public static boolean ensureVersion(final Activity activity, int minVersion) {
final FragmentManager fm = activity.getFragmentManager();
final String dialogTag = LIBRARY_PACKAGE + ":version";
Fragment curDialog = fm.findFragmentByTag(dialogTag);
if (getVersion(activity) >= minVersion) {
// we had shown is removed before returning.
if (curDialog != null) {
fm.beginTransaction().remove(curDialog).commitAllowingStateLoss();
}
return true;
}
// If we don't already have a version dialog displayed, display it now.
if (curDialog == null) {
curDialog = new VersionDialog();
fm.beginTransaction().add(curDialog, dialogTag).commitAllowingStateLoss();
}
// Tell the caller that the current version is not sufficient.
return false;
}
use of android.app.FragmentManager in project android_frameworks_base by ResurrectionRemix.
the class FilesActivity method refreshDirectory.
@Override
void refreshDirectory(int anim) {
final FragmentManager fm = getFragmentManager();
final RootInfo root = getCurrentRoot();
final DocumentInfo cwd = getCurrentDirectory();
assert (!mSearchManager.isSearching());
if (cwd == null) {
DirectoryFragment.showRecentsOpen(fm, anim);
} else {
// Normal boring directory
DirectoryFragment.showDirectory(fm, root, cwd, anim);
}
}
Aggregations