Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to preview a vector drawable

Tags:

android

svg

Short of building and installing my app, is there a way to preview a vector drawable xml file?

I've built it into a small test app in Android Studio, and can preview it as part of the layout file, but I was hoping for a simpler way.


Edit: here's what my drawable.xml file looks like:

<?xml version="1.0" encoding="utf-8"?> <vector xmlns:android="http://schemas.android.com/apk/res/android"     android:width="24dp"     android:height="24dp"     android:viewportWidth="24"     android:viewportHeight="24">      <group>         <path             android:fillColor="#f5a625"             android:strokeColor="#000000"             android:strokeWidth=".5"             android:pathData="M0,0l18,0l6,6l0,10l-24,0z" />     </group> </vector> 
like image 654
Edward Falk Avatar asked Oct 12 '15 23:10

Edward Falk


People also ask

How do I open a vector asset studio?

To start Vector Asset Studio: In Android Studio, open an Android app project. In the Project window, select the Android view. Right-click the res folder and select New > Vector Asset.

How do I open a drawable file?

Inside Android Studio go to File -> Settings -> Plugins -> Browse repositories. Search Android Drawable Preview.


2 Answers

There is a Preview tab especial for that at the right side (since Android Studio 2.0):

enter image description here

like image 89
dasar Avatar answered Oct 02 '22 20:10

dasar


If the Preview window doesn't automatically show. You can manually show the Preview window by going to View -> Tool Windows -> Preview in Android Studio's menu.

like image 24
Jade Avatar answered Oct 02 '22 18:10

Jade