title: Android : Rotate Vector Image to 90 degree
body: <p>I have following code for my vector:</p>
  <pre><code>&lt;vector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:width=&quot;24dp&quot;
      android:height=&quot;24dp&quot;
  
      android:viewportWidth=&quot;314.015&quot;
      android:viewportHeight=&quot;314.015&quot;&gt;
      &lt;path
          android:fillColor=&quot;#FCD83500&quot;
          android:pathData=&quot;M157.007,0C70.291,0 0,70.289 0,157.007c0,86.712 70.29,157.007 157.007,157.007c86.709,0 157.007,-70.295 157.007,-157.007C314.014,70.289 243.716,0 157.007,0zM31.403,157.015c0,-69.373 56.228,-125.613 125.604,-125.613V282.62C87.631,282.62 31.403,226.38 31.403,157.015z&quot; /&gt;
  &lt;/vector&gt;
  </code></pre>
  <p>and Output is:</p>
  <p><a href="https://i.stack.imgur.com/6nLwws.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6nLwws.png" alt="enter image description here" /></a></p>
  <p>But I want this image in all direction as below:</p>
  <p><a href="https://i.stack.imgur.com/WYiSrs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WYiSrs.png" alt="enter image description here" /></a> <a href="https://i.stack.imgur.com/XQaars.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XQaars.png" alt="enter image description here" /></a> <a href="https://i.stack.imgur.com/t9ii0s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/t9ii0s.png" alt="enter image description here" /></a></p>
  <h2>What I have tried:</h2>
  <p>Added <code>&lt;vector&gt;</code> tag in between <code>&lt;rotate&gt;</code> but its giving me warning like <strong><code>Element vector is not allowed here</code></strong></p>
  <pre><code>&lt;rotate xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:fromDegrees=&quot;90&quot;
      android:pivotX=&quot;50%&quot;
      android:pivotY=&quot;50%&quot;
      android:toDegrees=&quot;90&quot;&gt;
  
      &lt;vector 
          android:width=&quot;24dp&quot;
          android:height=&quot;24dp&quot;
  
          android:viewportWidth=&quot;314.015&quot;
          android:viewportHeight=&quot;314.015&quot;&gt;
          &lt;path
              android:fillColor=&quot;#FCD83500&quot;
              android:pathData=&quot;M157.007,0C70.291,0 0,70.289 0,157.007c0,86.712 70.29,157.007 157.007,157.007c86.709,0 157.007,-70.295 157.007,-157.007C314.014,70.289 243.716,0 157.007,0zM31.403,157.015c0,-69.373 56.228,-125.613 125.604,-125.613V282.62C87.631,282.62 31.403,226.38 31.403,157.015z&quot; /&gt;
      &lt;/vector&gt;
  &lt;/rotate&gt;
  </code></pre>
  <p>I have also tried to put <code>&lt;bitmap&gt;</code> tag in between <code>&lt;rotate&gt;</code> as below:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;rotate xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:fromDegrees=&quot;90&quot;
      android:pivotX=&quot;50%&quot;
      android:pivotY=&quot;50%&quot;
      android:toDegrees=&quot;90&quot;&gt;
  
      &lt;bitmap app:srcCompat=&quot;@drawable/ic_round&quot; /&gt;
  
  &lt;/rotate&gt;
  </code></pre>
  <p>but its giving me <strong>'src' attribute should be defined</strong> and I can't use <code>src</code> with vector images.</p>
  <p>Any solution to use this (one image) with all angle?</p>
  <blockquote>
  <p>NOTE: I want to use this image in <code>&lt;TextView&gt;</code> drawable.</p>
  </blockquote>