Search in sources :

Example 76 with FragmentManager

use of android.app.FragmentManager in project easypermissions by googlesamples.

the class BaseFrameworkPermissionsHelper method showRequestPermissionRationale.

@Override
public void showRequestPermissionRationale(@NonNull String rationale, @NonNull String positiveButton, @NonNull String negativeButton, @StyleRes int theme, int requestCode, @NonNull String... perms) {
    FragmentManager fm = getFragmentManager();
    // Check if fragment is already showing
    Fragment fragment = fm.findFragmentByTag(RationaleDialogFragment.TAG);
    if (fragment instanceof RationaleDialogFragment) {
        Log.d(TAG, "Found existing fragment, not showing rationale.");
        return;
    }
    RationaleDialogFragment.newInstance(positiveButton, negativeButton, rationale, theme, requestCode, perms).showAllowingStateLoss(fm, RationaleDialogFragment.TAG);
}
Also used : FragmentManager(android.app.FragmentManager) RationaleDialogFragment(pub.devrel.easypermissions.RationaleDialogFragment) Fragment(android.app.Fragment) RationaleDialogFragment(pub.devrel.easypermissions.RationaleDialogFragment)

Example 77 with FragmentManager

use of android.app.FragmentManager in project cloudrail-si-android-sdk by CloudRail.

the class MainActivity method browseToChargeView.

private void browseToChargeView(String service) {
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    Fragment content = ChargeViewer.newInstance(service);
    fragmentTransaction.replace(R.id.content, content, "chargeViewer");
    fragmentTransaction.commit();
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) Fragment(android.app.Fragment)

Example 78 with FragmentManager

use of android.app.FragmentManager in project cloudrail-si-android-sdk by CloudRail.

the class MainActivity method browseToServiceSelection.

private void browseToServiceSelection() {
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    Fragment content = ServiceSelect.newInstance();
    fragmentTransaction.replace(R.id.content, content, "serviceSelect");
    fragmentTransaction.commit();
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) Fragment(android.app.Fragment)

Example 79 with FragmentManager

use of android.app.FragmentManager in project cloudrail-si-android-sdk by CloudRail.

the class MainActivity method browseToCategorySelect.

private void browseToCategorySelect() {
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    Fragment content = CategorySelect.newInstance();
    fragmentTransaction.replace(R.id.content, content);
    fragmentTransaction.commit();
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) Fragment(android.app.Fragment)

Example 80 with FragmentManager

use of android.app.FragmentManager in project cloudrail-si-android-sdk by CloudRail.

the class MainActivity method browseToServiceSelection.

private void browseToServiceSelection() {
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    Fragment content = ChooseServiceFragment.newInstance();
    fragmentTransaction.replace(R.id.content, content);
    fragmentTransaction.commit();
    mCurrentFragment = "ChooseService";
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) Fragment(android.app.Fragment)

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