title: Rotate ImageView and FrameLayout correctly
body: <p>I have an Imageview inside a <strong>FrameLayout</strong> (both have <strong>Layout_margins</strong>),also i got my custom FrameLayout(same with <strong>Layout_margins</strong>).<br>
  So what i have now:<br>
  <a href="https://i.stack.imgur.com/6Suul.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Suul.jpg" alt="Source"></a><br>
  Source code(.axml):  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#ffff363c"
      android:layout_weight="100"
      android:clickable="true"&gt;
      &lt;FrameLayout
          android:id="@+id/MainFrameLayout"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_gravity="center"
          android:layout_weight="80"&gt;
          &lt;FrameLayout
              android:id="@+id/SourceFrame"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_gravity="center"
              android:layout_margin="10dp"&gt;
              &lt;ImageView
                  android:src="@android:drawable/ic_menu_camera"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:id="@+id/Img"
                  android:layout_margin="10dp" /&gt;
          &lt;/FrameLayout&gt;
          &lt;CustomFrameLayout
              android:id="@+id/CustomView"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:visibility="invisible"
              android:layout_margin="10dp" /&gt;
      &lt;/FrameLayout&gt;
  &lt;/LinearLayout&gt;  
  </code></pre>
  
  <p>And what i want exactly(programmatically rotation left,right via button):<br>
  <a href="https://i.stack.imgur.com/A9JJv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A9JJv.png" alt="MyGoal"></a>  </p>
  
  <p>So my main goal is to rotate properly image(and CustomFrameLayout too),also i need to store my source Width/Height of image.How can i achieve this?<br>
  I tried to set scaleType.center / scaletype.centerInisde , but that is wrong idea.<br>
  Any suggestions? Thanks!</p>