Paused Activity flashes Black on orientation change
<p>In my Application I make the images clickable, and once they are clicked another Dialogue type Activity is launched which contains a larger version of the image. The problem is that the Paused activity in the back flashes black whenever the orientation is changed. It seems like it isnt animating its orientation change. Only the Paused Activity flashes black.</p>

<p>Here is the code for the running Activity.</p>

<pre><code>public class ImageDialog extends Activity {

    private ImageView mDialog;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.image_dialog);
        mDialog = (ImageView)findViewById(R.id.imageView2);
        boolean tabletSize = getResources().getBoolean(R.bool.isTablet);
        if (tabletSize) {
            // do something
        } else {
            int orientationMode = getResources().getConfiguration().orientation;
            if (orientationMode == 1) {
               changeViewPlease();
            }
        }




    }
    public void onScreenClickClose(View view) {
        finish();
    }
    public void changeViewPlease() {
        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    }
}
</code></pre>

<p>and the style being used:</p>

<pre><code>      &lt;style name="myDialogTheme" parent="@android:style/Theme.Dialog"&gt;
    &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
    &lt;item name="android:windowFrame"&gt;@null&lt;/item&gt;
    &lt;item name="android:background"&gt;@android:color/transparent&lt;/item&gt;
    &lt;item name="android:windowBackground"&gt;@android:color/transparent&lt;/item&gt;
    &lt;item name="android:windowIsFloating"&gt;true&lt;/item&gt;
    &lt;item name="android:backgroundDimEnabled"&gt;true&lt;/item&gt;
    &lt;item name="android:backgroundDimAmount"&gt;.8&lt;/item&gt;
    &lt;item name="android:windowContentOverlay"&gt;@null&lt;/item&gt;
    &lt;item name="android:windowFullscreen"&gt;true&lt;/item&gt;
   &lt;/style&gt;
</code></pre>

<p>the layout xml sheet:</p>

<pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/image_dialog_root"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:onClick="onScreenClickClose" &gt;

    &lt;ImageView
        android:id="@+id/imageView2"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:src="@drawable/image1largerotated" /&gt;

&lt;/FrameLayout&gt;
</code></pre>

<p>Thanks everyone!</p>
