With our Sympli Handoff plugin for Android Studio, developers can easily generate code snippets for vector shapes, import colors, and fonts directly into their project. Let's see how to do it.
Generating Vector Drawables
Once you have installed the plugin and synced a project with your Android project, select the element in the design you want to generate the code for and click on "Generate Vector Drawable".
Alternatively, you can select a specific layer from the layers panel.
You'll be prompted to choose the location for your .xml file.
After this, your Vector Drawable will be created.
Styling codes for texts can be automated as well. Just select a text layer and click on the "Generate Styling Code" button that will appear in the specs.
The TextView code snippets will be generated.
Importing assets, colors, and fonts
To import assets, colors, and fonts to your project, click on the Import icon at the top of the design view in the plugin menu.
When importing assets, you'll be prompted to choose what resolutions and types of assets to import.
After this, your assets will be imported and the assets' files will be added to your project.
When importing colors, you'll need to choose the module, file (if you already have a file for colors, Sympli Handoff can add the colors for the screen to this file!), and the directory to save this file.
After this, your file for colors will be added/modified.
To import fonts, the fonts need to be added to the Sympli Handoff project first, if not, the Android Studio plugin will show a message saying that "The design does not have font files to import".