androidxml-drawable

How to preview xml drawable?


I'm working on pretty complex xml drawable and i was wondering if there is any tool/plugins which allow me to preview my drawable ?

I'm looking for something similar to the "Graphical layout" tab available for layout.

For example if i have something like this :

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:left="0dp" android:right="0dp"> 
        <shape android:shape="rectangle">

            <gradient android:angle="-90" android:startColor="#2B2B2B"
                android:endColor="#000000" />

        </shape>
    </item>
    <item android:top="1sp" android:bottom="26sp" > 
        <shape android:shape="rectangle">
            <solid android:color="#10ffffff"/>
    </shape>

    </item>
</layer-list>

How can i preview the shape and gradient ? And i'm probably dreaming , but is there any graphical tools to build a drawable ?


Solution

  • In Android Studio do this: View -> Tool Windows -> Preview