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);
}
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();
}
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();
}
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();
}
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";
}
Aggregations