alertdialog znika podczas ponownego ładowania aktywności na Androidzie

Muszę opracować jedną aplikację na Androida.

Stworzyłem jedno okno alarmowe. Jeśli muszę obrócić orientację, oznacza to, że okno dialogowe alarmu znika.

Ale chcę wyświetlić okno dialogowe alarmu, gdy zmieni się orientacja.

@Override
   public void onConfigurationChanged ( Configuration newConfig )
  {
      super.onConfigurationChanged(newConfig);
    try
    {
        MainActivity.editCalled = true;
        Intent in = new Intent(AndroidListFragmentActivity.this, AndroidListFragmentActivity.class);
        startActivity(in);
        finish();
    }
     catch (Exception e)
    {
        e.printStackTrace();
    }
}

Mam tutaj dwa fragmenty ...

W tym drugim fragmencie mającym jedno okno ostrzegawcze:

    ImageView share = (ImageView) findViewById(R.id.imageView5);
    share.setOnClickListener(new OnClickListener()
      {
        public void onClick ( View v )
        {
            final CharSequence[] items =
            {
                    "Facebook", "Twitter", "Email"
            };

            AlertDialog.Builder builder = new AlertDialog.Builder(SubCate.this);
            builder.setTitle("Share Via:");
            builder.setItems(items, new DialogInterface.OnClickListener()
            {
                public void onClick ( DialogInterface dialog , int item )
                {
                    if (items[item] == "Facebook")
                    {

                        onFacebookClick();
                    }
                    if(items[item] == "Twitter"){

                        onClickTwitt();
                       } 
                    if (items[item] == "Email")
                    {
                        Intent email = new Intent(Intent.ACTION_SEND);
                        email.setType("message/rfc822");

                        email.putExtra(Intent.EXTRA_EMAIL, new String[]
                        {
                                ""
                        });
                        email.putExtra(Intent.EXTRA_SUBJECT, _Substring);
                        email.putExtra(Intent.EXTRA_TEXT, ContentEmail);
                        startActivity(Intent.createChooser(email, "Choose an Email client :"));

                    }
                }
            });
            AlertDialog alert = builder.create();
            alert.show();
        }
      });
}
Here only i  have facing above problem..please give me solution for these ???

questionAnswers(2)

yourAnswerToTheQuestion