use of pub.devrel.easypermissions.RationaleDialogFragment 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);
}
Aggregations