VectorDrawable is not center aligned
<p>I've created a VectorDrawable file with the path data i had. But the issue is that image is not aligning at the centre of the total area and instead it's created as top-left aligned. Have a look:</p>

<p>The file:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0"&gt;

    &lt;path
        android:fillColor="@android:color/white"
        android:pathData="M7.144375,6.49965789 L13.196575,0.583973684 C13.333075,0.450552632 13.333075,0.233657895 13.196575,0.0995526316 C13.060075,-0.0331842105 12.838175,-0.0331842105 12.701675,0.0995526316 L6.649475,6.01592105 L0.596575,0.0995526316 C0.460775,-0.0331842105 0.238875,-0.0331842105 0.102375,0.0995526316 C-0.034125,0.233657895 -0.034125,0.450552632 0.102375,0.583973684 L6.154575,6.49965789 L0.102375,12.4153421 C-0.034125,12.5487632 -0.034125,12.7656579 0.102375,12.8997632 C0.170975,12.9661316 0.260575,12.9989737 0.350175,12.9989737 C0.439775,12.9989737 0.529375,12.9654474 0.597975,12.8997632 L6.650175,6.98339474 L12.702375,12.8997632 C12.770975,12.9661316 12.860575,12.9989737 12.950175,12.9989737 C13.039775,12.9989737 13.129375,12.9654474 13.197975,12.8997632 C13.334475,12.7656579 13.334475,12.5487632 13.197975,12.4153421 L7.145775,6.49965789 L7.144375,6.49965789 Z" /&gt;

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

<p>Now check how it actually looks when using as app:srcCompat for imageView.
<a href="https://i.stack.imgur.com/1VCv0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1VCv0.png" alt="close"></a></p>

<p>Is there any way to resolve this as i don't have much experience with VectorDrawables?</p>

<p>Any kind of help would be appreciated.</p>

<p><strong>EDIT:</strong> This is how i used the vector drawable.</p>

<pre><code>&lt;ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:srcCompat="@drawable/close_button"/&gt;
</code></pre>