Features
- Export PNG or WebP assets into multiple sizes.
- Preview and export nine-patch assets into multiple sizes.
- Export vector drawable asset, support gradient and mask.
- Export app launcher icon for Android 8 and older version.
- View and export shape drawable XML code from selected layer.
- View and export color resource XML code from selected layers.
Installation
Install plugin
- Search “Android Res Export” from Sketch Runner.
- Download master.zip and unzip, then double-click “Android_Res_Export.sketchplugin” to install.
How it Works
Design at MDPI (1x) size, NOT support for other sizes.
You need to create new asset from selected layers, by run “Plugins” – “Android Res Export” – “New …”, then run “Export …” to export them. while you have selected layers, the export feature will only export the layer which is selected, and deselected all to export all assets in current document.
For export bitmap and nine-patch assets, you can choose what dpi will exported in “Android Res Export” – “Preferences” dialog.
For export vector drawable, you need to install Node.js (> 8.0) and svg2vectordrawable (2.6.5+).