Example usage for android.support.v4.app FragmentActivity getSupportFragmentManager

List of usage examples for android.support.v4.app FragmentActivity getSupportFragmentManager

Introduction

In this page you can find the example usage for android.support.v4.app FragmentActivity getSupportFragmentManager.

Prototype

public FragmentManager getSupportFragmentManager() 

Source Link

Document

Return the FragmentManager for interacting with fragments associated with this activity.

Usage

From source file:com.likou.util.NImageLoader.java

/**
 * Creates an ImageLoader with Bitmap memory cache. No default placeholder
 * image will be shown while the image is being fetched and loaded.
 *//*from   w w  w.jav a  2  s  . co m*/
public NImageLoader(FragmentActivity activity) {
    super(newRequestQueue(activity), BitmapCache.getInstance(activity.getSupportFragmentManager()));
    mResources = activity.getResources();
}

From source file:com.conferenceengineer.android.iosched.util.ImageLoader.java

/**
 * Creates an ImageLoader with Bitmap memory cache and a default placeholder image while the
 * image is being fetched and loaded./*  w w w  .j av a  2  s  .co m*/
 */
public ImageLoader(FragmentActivity activity, int defaultPlaceHolderResId) {
    super(newRequestQueue(activity), BitmapCache.getInstance(activity.getSupportFragmentManager()));
    mResources = activity.getResources();
    mPlaceHolderDrawables = new ArrayList<Drawable>(1);
    mPlaceHolderDrawables
            .add(defaultPlaceHolderResId == -1 ? null : mResources.getDrawable(defaultPlaceHolderResId));
}

From source file:com.conferenceengineer.android.iosched.util.ImageLoader.java

/**
 * Creates an ImageLoader with Bitmap memory cache and a list of default placeholder drawables.
 *//* w w w  .  j  ava  2  s  .  c  om*/
public ImageLoader(FragmentActivity activity, ArrayList<Drawable> placeHolderDrawables) {
    super(newRequestQueue(activity), BitmapCache.getInstance(activity.getSupportFragmentManager()));
    mResources = activity.getResources();
    mPlaceHolderDrawables = placeHolderDrawables;
}

From source file:net.simonvt.cathode.util.FragmentStack.java

private FragmentStack(FragmentActivity activity, int containerId, Callback callback) {
    this.activity = activity;
    fragmentManager = activity.getSupportFragmentManager();
    this.containerId = containerId;
    this.callback = callback;
}

From source file:org.alfresco.mobile.android.application.managers.ActionUtils.java

public static void actionSend(FragmentActivity activity, File myFile, ActionManagerListener listener) {
    try {//from   w w w.j  ava2s . c o m
        String mimeType = MimeTypeManager.getInstance(activity).getMIMEType(myFile.getName());
        if (SamsungManager.getInstance(activity) != null && SamsungManager.getInstance(activity).hasPenEnable()
                && (mimeType == null || mimeType.equals("application/octet-stream")) && MimeTypeManager
                        .getExtension(myFile.getName()).equals(SamsungManager.SAMSUNG_NOTE_EXTENSION_SPD)) {
            mimeType = SamsungManager.SAMSUNG_NOTE_MIMETYPE;
        }
        if (DataProtectionManager.getInstance(activity).isEncrypted(myFile.getPath())) {
            WaitingDialogFragment dialog = WaitingDialogFragment.newInstance(R.string.data_protection,
                    R.string.decryption_title, true);
            dialog.show(activity.getSupportFragmentManager(), WaitingDialogFragment.TAG);
            DataProtectionManager.getInstance(activity).decrypt(SessionUtils.getAccount(activity), myFile,
                    DataProtectionManager.ACTION_SEND);
        } else {
            actionSend(activity, myFile, mimeType);
        }
    } catch (Exception e) {
        AlfrescoNotificationManager.getInstance(activity).showAlertCrouton(activity,
                R.string.error_unable_open_file);
    }
}

From source file:com.likou.util.NImageLoader.java

/**
 * Creates an ImageLoader with Bitmap memory cache and a default placeholder
 * image while the image is being fetched and loaded.
 *//*from w  ww  .  jav a 2 s  .  c om*/
public NImageLoader(FragmentActivity activity, int defaultPlaceHolderResId) {
    super(newRequestQueue(activity), BitmapCache.getInstance(activity.getSupportFragmentManager()));
    mResources = activity.getResources();
    mPlaceHolderDrawables = new ArrayList<Drawable>(1);
    mPlaceHolderDrawables
            .add(defaultPlaceHolderResId == -1 ? null : mResources.getDrawable(defaultPlaceHolderResId));
}

From source file:com.esri.android.rt.map.SingleTapListener.java

private void showPopup(PopupFragment fragment) {
    if (fragment.isDisplayed())
        return;// w  w  w. jav a  2s . c  o m

    FragmentActivity activity = (FragmentActivity) mMapView.getContext();
    FragmentTransaction transaction = activity.getSupportFragmentManager().beginTransaction();
    transaction.setCustomAnimations(R.anim.popup_rotate_in, R.anim.popup_rotate_out);
    transaction.add(android.R.id.content, fragment, null);
    transaction.addToBackStack(null);
    transaction.commit();
    fragment.setDisplayed(true);
}

From source file:com.likou.util.NImageLoader.java

/**
 * Creates an ImageLoader with Bitmap memory cache and a list of default
 * placeholder drawables.//from  w ww.j a v  a  2  s  .  co  m
 */
public NImageLoader(FragmentActivity activity, ArrayList<Drawable> placeHolderDrawables) {
    super(newRequestQueue(activity), BitmapCache.getInstance(activity.getSupportFragmentManager()));
    mResources = activity.getResources();
    mPlaceHolderDrawables = placeHolderDrawables;
}

From source file:org.chromium.chrome.browser.media.router.BaseMediaRouteDialogManager.java

@Override
public void openDialog() {
    if (mAndroidMediaRouter == null) {
        mDelegate.onDialogCancelled();//from  w w w. j  a  va2s  .  co  m
        return;
    }

    FragmentActivity currentActivity = (FragmentActivity) ApplicationStatus.getLastTrackedFocusedActivity();
    if (currentActivity == null) {
        mDelegate.onDialogCancelled();
        return;
    }

    FragmentManager fm = currentActivity.getSupportFragmentManager();
    if (fm == null) {
        mDelegate.onDialogCancelled();
        return;
    }

    mDialogFragment = openDialogInternal(fm);
    if (mDialogFragment == null) {
        mDelegate.onDialogCancelled();
        return;
    }
}

From source file:com.egoclean.testpregnancy.util.ActivityHelper.java

public boolean onOptionsItemSelected(MenuItem item, FragmentActivity activity) {
    switch (item.getItemId()) {
    case R.id.menu_close:
        FragmentManager fm = activity.getSupportFragmentManager();
        ConfirmCloseDialog confirmCloseDialog = new ConfirmCloseDialog();
        confirmCloseDialog.show(fm, ConfirmCloseDialog.DIALOG_ID);
        break;/*from ww w  . ja  va2 s  .  c  o m*/
    case R.id.menu_settings:
        Intent intent = new Intent(mActivity, Settings.class);
        mActivity.startActivity(intent);
        break;
    }
    return false;
}