Giter Club home page Giter Club logo

android_res_export's Introduction

Android Res Export

中文说明

Export Android resources in Sketch – PNG assets, app icon, nine-patch image, shape XML, color resource xml and vector drawable.

Features

  • Export PNG assets into multiple sizes.
  • Preview and export nine-patch assets into multiple sizes.
  • Export app launcher icon for Android 8 and older version.
  • View and export shape drawable XML code.
  • Export vector drawable asset.
  • Compress PNGs after export use ImageOptim.
  • View and export color resource XML code from Sketch document colors or selected layers.

Installation

Install plugin

Nine-patch support configure

Install Command Line Tools.

xcode-select --install

Install Homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After hombrew installed, use this command to install ImageMagick.

brew install imagemagick

Vector drawable support configure

Install Node.js. Then use this command to install SVGO and svg2vectordrawable.

npm install -g svgo svg2vectordrawable

How it Works

Design at MDPI (1x) size, NOT support for other sizes. Download demo.sketch

Use menu "Plugins" - "Android Res Export" - "New PNG Asset" to create PNG assets.

Use menu "Plugin" - "Android Res Export" - "New Nine-Patch Asset" to create a nine-patch asset. Run "Nine-Patch Preview " for preview the nine-patch assset.

Use menu "Plugin" - "Android Res Export" - "New Vector Drawable Asset" to create a vector drawable asset.

If you want to support Android API < 24 (7.0), select the shape layers in vector drawable group, click the settings icon in fill property panel, and choose "Non-Zero".

Before export the assets, you must create them use "New ... Asset" in plugin menu. Selected the spical asset layer group, then run "Export ... Assets" to export them, and deselected all to export all assets.

For app icons, you need to selected the template page, before run the "Export App Icon".

License

Apache 2.o

Donate

Donate $1.00, $2.00, $5.00 via PayPal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.