Are there any Android Drawable designers?

2020-05-18 04:07发布

问题:

I would like to use more vector drawings in my Android applications. Providing images isn't as space efficient or as scalable as I would like it to be.

Android provides a series of Drawable file formats, such as ShapeDrawable, which can be combined in a LayeredDrawable. To go very far down this path, it would be nice if there was a designer for visualizing the results, doing the drawing in, and handling all the resulting files.

C# WPF has Expression Blend, Adobe has Flash CS4, and the iPhone has Opacity. So my question is, is there a designer or drawing tool for Android?

Note: Other questions have talked about using SVG in Android. Android doesn't have native support for SVG, so the only way to do it is with an external library. I would like to avoid that and am asking for a developer side tool. An SVG to Drawable converter would be fine, but I'm not aware of one.

回答1:

I faced the same problem and I've just released a little library on github that allow to export svg to drawable more quickly.

https://github.com/r3gis3r/svg2drawable

Hope can be useful for you.



回答2:

For the sub-subset of rectangular ShapeDrawables there is a nice tool online at Angry Tools which allows one to edit a button's drawable:

http://angrytools.com/android/button/



回答3:

I would suggest you using Vector Drawables, which are natively supported by Android 5.0+. There is an SVG to VectorDrawable Converter, so you can create SVG images in your favorite editor.

BetterVectorDrawable is the VectorDrawable implementation for Android 4.0+ with configurable fall-back behavior on Android 5.0+.

SVG to VectorDrawable Converter is the batch converter of SVG images to Android VectorDrawable XML resource files. Online version exists.

Links point to readmes, which provide enough information on how to use the lib and the converter.



回答4:

The closest thing I've found since asking this question is DroidDraw. It is targeted at showing the screen layouts such as LinearLayout. It did not seem to support ShapeDrawable and the file management seemed a little confusing.

I'm thinking that it would be a good place to start looking at how to write an application that does manage ShapeDrawable.



回答5:

Yes, there is.

https://play.google.com/store/apps/details?id=com.tiraisoft.drawabledesigner

It runs on Android so you can see the changes live.

Disclaimer: I'm the author