android setrotation probem on fragment
<p>Sorry for what might be a dumb question.
I am having a problem running a simple setRotation on a linear layout that houses a fragment.
Running on a galaxy S3 and ticking disable hardware overlays in developer options makes everything work really smoothly, without it, it causes only portions of the view to be displayed in a haphazard patch type display when in landscape.</p>

<p>The reason i am rotating the view and adjusting its layout parameters is because there is a list that i need to have visible with the items the user has selected even during screen rotation.</p>

<p>the view is displayed above a camera surface.</p>

<p>The xml layout of the view:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/occasionsOptionsLinearLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical"
android:gravity="top"
android:orientation="vertical" &gt;

&lt;LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical" &gt;

    &lt;TextView
        android:id="@+id/whatOccasionTextView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.7"
        android:gravity="left"
        android:padding="8dp"
        android:text="@string/whatstheoccasion"
        android:textColor="@color/Black"
        android:textSize="@dimen/textMedium" /&gt;

    &lt;ImageView
        android:id="@+id/occasionTitleImage"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:layout_margin="2dp"
        android:layout_weight="0.3"
        android:padding="2dp"
        android:src="@drawable/mood" /&gt;
&lt;/LinearLayout&gt;

&lt;ScrollView
    android:id="@+id/occasionscrollView"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:fillViewport="true" &gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1" &gt;

        &lt;fragment
            android:id="@+id/occasion_fragment"
            android:name="com.myapp.record.Occasions"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
             /&gt;
    &lt;/LinearLayout&gt;
&lt;/ScrollView&gt;

&lt;LinearLayout
    android:id="@+id/occasionaOptionsClose"
    android:layout_width="fill_parent"
    android:layout_height="55dp"
    android:layout_gravity="center_vertical"
    android:gravity="center_vertical"
    android:orientation="horizontal" &gt;

    &lt;ImageView
        android:id="@+id/occasionsOptionsCloseAction"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_gravity="center_vertical"
        android:layout_weight="1"
        android:src="@drawable/close" /&gt;
&lt;/LinearLayout&gt;

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

<p>and the call to rotate the view:</p>

<pre><code> occasionsIncluder = (LinearLayout) findViewById(R.id.occasionIncluder);
occasionsIncluder.setRotation(rotateToValue);
</code></pre>

<p>rotateToValue is a simple call to the screen orientation value in degrees.</p>

<p>my question is why would disabling hardware overlays cause it to actually work better, i thought this option was to make things run smoother anyway?</p>

<p>Many thanks.</p>
