Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:00:35+00:00 2026-06-07T17:00:35+00:00

I am using the support library to create dialogs using fragments. And i Have

  • 0

I am using the support library to create dialogs using fragments.

And i Have the following code to show and dismiss the dialogs:

@Override
public void onCreate(Bundle savedInstanceState) {
    Log.d("Create", "Create");
    setContentView(R.layout.activity_report);
    init();
    addListeners();
    addhandlerListener();
    super.onCreate(savedInstanceState);
}

private void showDialog(final Class<?> classs) {
    if (classs.equals(AddressValidateProgress.class)) {
        addressValidateProgress = AddressValidateProgress.newInstance();
        addressValidateProgress.show(getSupportFragmentManager(), null);
        Log.d("counter", "+1");
    }
    if (classs.equals(GPSSearchProgress.class)) {
        showDialog(gpsSearchloadId);
    }
}

private void dismissDialog(final Class<?> classs) {
    if (classs.equals(AddressValidateProgress.class)) {
        FragmentTransaction ft = getSupportFragmentManager()
                .beginTransaction();
        ft.remove(addressValidateProgress).commitAllowingStateLoss();
        addressValidateProgress = null;
        Log.d("super", addressValidateProgressId + ":dismissed");
    }
    if (classs.equals(AddressChooseDialog.class)) {
        FragmentTransaction ft = getSupportFragmentManager()
                .beginTransaction();
        ft.remove(addressChooseDialog).commitAllowingStateLoss();
        addressChooseDialog = null;
    }
    if (classs.equals(GPSSearchProgress.class)) {
        dismissDialog(gpsSearchloadId);
        Log.d("super", gpsSearchloadId + ":dismissed");
    }
}

If i start the application in portrait mode i can use the dialogs normally, i can even rotate the screen and the dialogs are reconstructed.
The problem is that if i start the application rotate the screen and click the button that open the dialogs i get an exception:

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:00:36+00:00Added an answer on June 7, 2026 at 5:00 pm

    Solution found.

    It was caused by a static Handler declared

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this page, http://developer.android.com/sdk/compatibility-library.html , I have installed the Android Support Package, added a
I have created following thing in android using android compatibility support package Basically i
I am using the following code to dynamically create an INPUT element and assign
I want to create a barchart using the gRaphael javascript library. Does gRaphael support
I'm using Android-support-v4 I have a PagerAdapter that displays a list fragment in each
I have a Visual Studio 2008 C++ project that has support for using multiple
Does the Selenium 2 C# library support using Selenium 1 commands? I know in
I am trying to create python bindings to a vala library using pygi with
is it possible to create support multiple screen size in android 3.1 using support
I am using Excel 2007. I have C# code written in a separate binary.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.