title: How to rotate a imageView in portrait / landscape changing
body: <p>I have a layout with a <code>ImageView</code> that I want to keep similar in  landscape and portrait orientations, such as this figure:</p>
  
  <p><a href="https://i.stack.imgur.com/tYVmg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tYVmg.png" alt="Portrait and landscape layouts"></a></p>
  
  <p>I'm using two similar layouts (layout and layout-land). In the second layout, I add the <code>android:rotation</code> parameter such in code below, but it resulted in this figure:</p>
  
  <p><a href="https://i.stack.imgur.com/fUBrh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fUBrh.png" alt="Landscape"></a></p>
  
  <pre><code>&lt;ImageView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:rotation="90"
      android:scaleType="fitXY"
      android:src="@drawable/background_agogo" /&gt;
  </code></pre>
  
  <p>Is it possible to rotate the image view using only xml layout file? How could I do it?</p>