Search in sources :

Example 71 with FragmentManager

use of android.app.FragmentManager in project android_frameworks_base by crdroidandroid.

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);
}
Also used : FragmentManager(android.app.FragmentManager) RootInfo(com.android.documentsui.model.RootInfo) DocumentInfo(com.android.documentsui.model.DocumentInfo)

Example 72 with FragmentManager

use of android.app.FragmentManager in project meatspace-android by RomainPiel.

the class MainActivity method showSettings.

/**
 * show settings dialog
 */
private void showSettings() {
    FragmentManager fm = getFragmentManager();
    new SettingsFragment().show(fm, null);
}
Also used : FragmentManager(android.app.FragmentManager) SettingsFragment(com.romainpiel.lib.ui.fragment.SettingsFragment)

Example 73 with FragmentManager

use of android.app.FragmentManager in project RxPermissions by tbruyelle.

the class RxPermissions method getRxPermissionsFragment.

private RxPermissionsFragment getRxPermissionsFragment(Activity activity) {
    RxPermissionsFragment rxPermissionsFragment = findRxPermissionsFragment(activity);
    boolean isNewInstance = rxPermissionsFragment == null;
    if (isNewInstance) {
        rxPermissionsFragment = new RxPermissionsFragment();
        FragmentManager fragmentManager = activity.getFragmentManager();
        fragmentManager.beginTransaction().add(rxPermissionsFragment, TAG).commitAllowingStateLoss();
        fragmentManager.executePendingTransactions();
    }
    return rxPermissionsFragment;
}
Also used : FragmentManager(android.app.FragmentManager)

Example 74 with FragmentManager

use of android.app.FragmentManager in project AvoidOnResult by AnotherJack.

the class AvoidOnResult method getAvoidOnResultFragment.

private AvoidOnResultFragment getAvoidOnResultFragment(Activity activity) {
    AvoidOnResultFragment avoidOnResultFragment = findAvoidOnResultFragment(activity);
    if (avoidOnResultFragment == null) {
        avoidOnResultFragment = new AvoidOnResultFragment();
        FragmentManager fragmentManager = activity.getFragmentManager();
        fragmentManager.beginTransaction().add(avoidOnResultFragment, TAG).commitAllowingStateLoss();
        fragmentManager.executePendingTransactions();
    }
    return avoidOnResultFragment;
}
Also used : FragmentManager(android.app.FragmentManager)

Example 75 with FragmentManager

use of android.app.FragmentManager in project Klyph by jonathangerbaud.

the class DonateActivity method onActivityResult.

/**
 * Needed for Google Play In-app Billing. It uses
 * startIntentSenderForResult(). The result is not propagated to the
 * Fragment like in startActivityForResult(). Thus we need to propagate
 * manually to our Fragment.
 *
 * @param requestCode
 * @param resultCode
 * @param data
 */
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    FragmentManager fragmentManager = getFragmentManager();
    Fragment fragment = fragmentManager.findFragmentByTag("donationsFragment");
    if (fragment != null) {
        ((DonateFragment) fragment).onActivityResult(requestCode, resultCode, data);
    }
}
Also used : FragmentManager(android.app.FragmentManager) DonateFragment(com.abewy.android.apps.klyph.fragment.DonateFragment) Fragment(android.app.Fragment) DonateFragment(com.abewy.android.apps.klyph.fragment.DonateFragment)

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