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?
-
You have to design .xml following mock ups – Rasel Oct 07 '19 at 05:03
2 Answers
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"/>

- 3,136
- 7
- 32
- 38

- 292
- 1
- 9
- 25
So with the advent of Invision Studios, you can use your sketch app with a sketch app plugin called Craft which enables you to move your screens design to envision for prototyping and also to be able to view assets. Once you're on Invision, you can use the inspect tab to view some code snippets ranging from XML to Sass and even Css, which can be copied from clipboard. Description of how Invision studio looks

- 161
- 1
- 6