Blog / #tech

VIAS makes building Android apps in Xamarin easier

Developing cross-platform mobile applications with Xamarin is awesome. We decided to try and make it even better. We are proud to present View in Android Studio, an open source Xamarin Studio add-in developed by us, that makes the crafting Android UI with Xamarin Studio more efficient than ever.

Xamarin is a great development tool that we use a lot on a daily basis. It lets the users write native applications for all major platforms (iOS, Android, Mac & Windows) in C# language. That way, a significant part of the code can be used across the platforms, which greatly saves time compared to building the app for all platforms from scratch.

Xamarin also offers Xamarin Studio, which features a huge set of tools for coding user interfaces. For heavy-duty development on iOS however, we usually end up combining Xamarin Studio with Apple’s own Xcode in our workflow. In Android’s case this has not been as easy, since one is forced to use Xamarin’s own editors for layouts and other resources. Xamarin’s Android editors leave some things to be desired compared to those developed by Google. This is due to the fact that Google develops the whole platform and has huge amount of resources that will most likely always keep them a few steps ahead.

To bridge this gap, we decided to put our engineering minds to work and created View in Android Studio (VIAS). VIAS is an add-in that lets one view and edit Xamarin Android’s User Interface files in Android Studio. In short, it works as a mediator between Android Studio and Xamarin.Android, in very much the same way as utilising Xcode while working with Xamarin.iOS. Quite handy, indeed!

mistakes
Me after installing the add-in.

So how does it work? With Xamarin Studio open, the users must first open the context menu of an .xml file by right-clicking it. From the context menu, one has the option to view the file in Android Studio. The add-in links the .xml files that you’ve worked with in Xamarin studio to Android Studio skeleton project where you’re free to work your developer magic with the full toolset available at all times. What’s more, all the changes you make in Android Studio are automatically synced with Xamarin Studio.

kuvitus 3
View in Android Studio add-in in action.

The size of the whole add-in is only 64KB – so no need to worry about it causing any extra burden. The add-in is currently only supported by OS X, the platform we work with the most.

Feel free to try out the extension yourself – or spread the word among your Xamarin-friendly colleagues. VIAS is available to download from our repository at Github. You can thank us by following us on social media or by just generally putting in a good word for us :)

Happy coding!