有没有办法预览可绘制的矢量 [英] Is there a way to preview a vector drawable
本文介绍了有没有办法预览可绘制的矢量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
构建和安装我的应用程序很短,有没有办法预览矢量可绘制的xml文件?
Short of building and installing my app, is there a way to preview a vector drawable xml file?
我已将其内置到Android Studio中的一个小型测试应用中,并且可以将其作为布局文件的一部分进行预览,但是我希望有一种更简单的方法.
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.
这是我的drawable.xml文件的样子:
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>
推荐答案
在右侧(自Android Studio 2.0起),特别有预览标签:
There is a Preview tab especial for that at the right side (since Android Studio 2.0):
这篇关于有没有办法预览可绘制的矢量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文