What’s New In the Xamarin Android Designer
Backed by your feedback, our team has been able to improve the Xamarin Android Designer significantly since it’s initial release a few years back. Now, we have a ton of new and exciting work that we can’t wait to share with you.
Xamarin Android Designer
All of the following features are currently available in the latest stable version of Visual Studio 2017.
New Android Resources Subsystem
Previously our way of handling Android project resources used a complex system spanning Java and C# so that we could support both layout rendering and querying data from your resources. We have since developed a complete API, very similar in spirit to what Roslyn offers for C#, that allows us to completely understand resources without involving any Java code.
This new library now drives all resources operations we do from rendering to theme manipulation or autocompletion of resource names. It’s also much more efficient than before thanks to faster parsing, aggressive caching, and a better data model for querying.
Revamped Property Panel
We have also developed a new property panel with a more intelligent design foundation and code-sharing strategy. We plan to streamline this on all of our designers with a native UI and experience for each IDE.
Indirect rendering allows the designer to process graphic updates when rendering your layout in a fully asynchronous manner. The concept is very similar to what modern web browsers are doing today, where rendering is achieved out-of-process and efficiently composited by the GPU in the main window.
Support for New Android Features
Leveraging the XAML Designer Shell on Visual Studio
Thanks to the collaboration of the Visual Studio XAML experiences team (in charge of both the WPF and UWP designers), we are now reusing the same designer UI shell to host the Android designer on Visual Studio 2017 making us benefit from the same solid foundation and familiar user experience.
Updated Android Studio
Pieces of code from Android Studio’s layout renderer are openly shared as part of the Android Open-Source Project (AOSP) allowing us to leverage them. As such, we have been continuously following the different releases (2.3, 3.0, and recently 3.1) to bring in the best of the fixes and performance improvements made by Google.
What’s next in 15.8
The following features are in the works and almost ready for Preview, or currently available on the Visual Studio 2017 15.8 Preview Channel.
Reworked XML parsing
The Android Designer is now using the XmlParser project instead of System.Xml.Linq APIs. This will no longer continuously reformat your AXML source and only apply the minimum subset of necessary changes when you use the designer.
A split-view editor was introduced which allows you to create, edit, and preview your layouts at the same time:
Improved source experience
Another great collaboration we had is with the Visual Studio Platform team responsible, among others, for the text editor and all the language services extensibility.
Over the past few months, they have been improving the APIs of common IntelliSense features such as autocompletion and quick info (the popover shown once you hover text) to make them faster and
await friendly. We are taking advantage of these new functionalities to provide an even better source experience for layout editing.
You can now inject sample placeholder data or images into your views so that you can preview how the layout would behave. The following sample data sources are available:
In a future release you will be able to define your own source of data.
What is Coming Next
- Navigation Editor
- Constraint Layout Editing
- MotionLayout with more animation tools.
- Faster Designer Startup
- More `tools:` Attributes Support
- Easier use of Android Jetpacks/Support Libraries
Enjoy this post? Discuss any questions or comments on the Xamarin Forums.