Skip to content

Instantly share code, notes, and snippets.

@waseefakhtar
Created January 2, 2020 21:11
Show Gist options
  • Save waseefakhtar/82e1264c359938efc9d2416b0d97516b to your computer and use it in GitHub Desktop.
Save waseefakhtar/82e1264c359938efc9d2416b0d97516b to your computer and use it in GitHub Desktop.
IllegalStateException: Can not perform this action after onSaveInstanceState
private static void showNewRewardDialog(FragmentActivity fragmentActivity) {
RewardDialogFragment dialogFragment = RewardDialogFragment.newInstance();
final FragmentManager fragmentManager = fragmentActivity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(dialogFragment, RewardDialogFragmentKt.FRAGMENT_TAG).commitAllowingStateLoss();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment