Search code examples
androidxmlandroid-studioadobe-illustratorsketch-3

How to use Sketch/Illustrator designs in android studio


So, I'm developing an application in android studio, my company will give me designs created in sketch/illustrator, so how do I use them? Do I have to create the whole design in xml from scratch following the mock-up screens or can I get those mock-ups in .xml file and import them directly smh?


Solution

  • You need to create the XML file from scratch. When you get your designs the first thing you need to do is upload it to your Android Studio project. You do that by adding it to the 'drawable' folder. If you have more then one resolution (aka hdpi, xhdpi, xxhdpi and xxxhdpi) you have 'drawable-hdpi' folder (and so on). After the designs are in your project, you need to implement them in your XML file.

    You can do it for example with ImageView:

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/YOUR-DESIGN"/>