title: Rotating views in a LinearLayout problem
body: <p>I have a LinearLayout with a vertical orientation, within that layout I have three buttons (ImageButtons to be exact) and when the orientation changes (via an OrientationEventListener) I have them set to perform a rotation animation.  The top and bottom buttons rotate perfectly, however the middle one does not.  Its pivot point seems to be off.</p>
  
  <p>Here is the layout of the animation:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
      android:fromDegrees="0" 
      android:toDegrees="-90"
      android:pivotX="50%" 
      android:pivotY="50%"
      android:duration="500"/&gt;
  </code></pre>
  
  <p>...and here is how I initiate the animation:</p>
  
  <pre><code>Animation rotate = AnimationUtils.loadAnimation(this.mContext, animResId);
  rotate.setFillEnabled(true);
  rotate.setFillAfter(true);
  {...retrieve the each ImageButton then call startAnimation(rotate) on them...}
  </code></pre>
  
  <p>...and here is the layout for the component in my activity that is the LinearLayout for my menu:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/camera_menu"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_alignParentTop="true"
      android:layout_toRightOf="@+id/camera_preview"
      android:layout_alignParentRight="true"
      &gt;
      &lt;ImageButton
              android:id="@+id/camera_top_button"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_weight="3"
              android:src="@drawable/placeholder"
              android:scaleType="centerInside"
              android:onClick="onTopButtonClick"
      /&gt;
      &lt;ImageButton
              android:id="@+id/camera_action_button"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_weight="2"
              android:src="@drawable/placeholder"
              android:scaleType="centerInside"
              android:onClick="onActionButtonClick"
      /&gt;
      &lt;ImageButton
              android:id="@+id/camera_bottom_button"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_weight="3"
              android:src="@drawable/placeholder"
              android:scaleType="centerInside"
              android:onClick="onBottomButtonClick"
      /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Does anyone have an idea as to why the middle (action) button is not rotating around the correct pivot point?</p>
  
  <p>One thing I have noticed is that after rotating, the middle button is aligned with the tops of the other two, smaller buttons (the top and bottom buttons).</p>
  
  <p>Thanks in advance for any help!</p>
  
  <p>Regards, celestialorb.</p>