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 ?
A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon . There are several different types of drawables: Bitmap File.
Inside Android Studio go to File -> Settings -> Plugins -> Browse repositories. Search Android Drawable Preview.
In Android Studio do this: View -> Tool Windows -> Preview
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With