{"id":37239,"date":"2018-06-25T16:10:38","date_gmt":"2018-06-25T23:10:38","guid":{"rendered":"https:\/\/blog.xamarin.com\/?p=37239"},"modified":"2019-04-04T07:45:27","modified_gmt":"2019-04-04T14:45:27","slug":"future-xamarin-android-designer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/future-xamarin-android-designer\/","title":{"rendered":"What&#8217;s New In the Xamarin Android Designer"},"content":{"rendered":"<p>\t\t\t\tBacked by your feedback, our team has been able to improve the Xamarin Android Designer significantly since it&#8217;s initial release a few years back. Now, we have a ton of new and exciting work that we can&#8217;t wait to share with you.<\/p>\n<h2>Xamarin Android Designer<\/h2>\n<p><strong>All of the following features are currently available in the latest stable version of <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/install\/update-visual-studio\">Visual Studio 2017<\/a>.<\/strong><\/p>\n<h2>New Android Resources Subsystem<\/h2>\n<p>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.<\/p>\n<p>This new library now drives all resources operations we do from rendering to theme manipulation or autocompletion of resource names. It\u2019s also much more efficient than before thanks to faster parsing, aggressive caching, and a better data model for querying.<\/p>\n<h2>Revamped Property Panel<\/h2>\n<p>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.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-37246 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/new-property-panel.png\" alt=\"\" width=\"400\" height=\"455\" \/><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-37247 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/new-property-panel2.png\" alt=\"\" width=\"383\" height=\"538\" \/><\/p>\n<h2>Indirect rendering<\/h2>\n<p>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.<\/p>\n<h2>Support for New Android Features<\/h2>\n<div>Among the new Android features that arrived with the latest release of Oreo, we have specifically added support for custom fonts and adaptative icons rendering.\n<img decoding=\"async\" class=\"wp-image-37245 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/custom-fonts.png\" alt=\"\" width=\"600\" height=\"103\" \/><\/p>\n<h2>Leveraging the XAML Designer Shell on Visual Studio<\/h2>\n<p>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.<\/p>\n<h2>Updated Android Studio<\/h2>\n<p>Pieces of code from Android Studio\u2019s 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.<\/p>\n<h2>What&#8217;s next in 15.8<\/h2>\n<p><strong>The following features are in the works and almost ready for Preview, or currently available on the <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">Visual Studio 2017 15.8 Preview Channel<\/a>.<\/strong><\/p>\n<h2>Reworked XML parsing<\/h2>\n<p>The Android Designer is now using the <a href=\"https:\/\/github.com\/KirillOsenkov\/XmlParser\">XmlParser project<\/a> 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.<\/p>\n<h2>Split-view editor<\/h2>\n<p>A split-view editor was introduced which allows you to create, edit, and preview your layouts at the same time:<\/p>\n<p><div style=\"width: 2502px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-37239-1\" width=\"2502\" height=\"1268\" loop autoplay preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/android-designer-newstuff.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/android-designer-newstuff.mp4\">https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/android-designer-newstuff.mp4<\/a><\/video><\/div><\/p>\n<h2>Improved source experience<\/h2>\n<p>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.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-37249 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/vseditor-integration.png\" alt=\"\" width=\"500\" height=\"317\" \/><\/p>\n<p>Over the past few months, they have been <a href=\"https:\/\/github.com\/Microsoft\/vs-editor-api\/wiki\">improving the APIs<\/a> of common IntelliSense features such as autocompletion and quick info (the popover shown once you hover text) to make them faster and <code>async<\/code>\/<code>await<\/code> friendly. We are taking advantage of these new functionalities to provide an even better source experience for layout editing.<\/p>\n<h2>Sample data<\/h2>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-37248\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/sample-data.png\" alt=\"\" width=\"600\" height=\"316\" \/><\/p>\n<p>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:<\/p>\n<ul>\n<li>@tools:sample\/cities<\/li>\n<li>@tools:sample\/names<\/li>\n<li>@tools:sample\/street_types<\/li>\n<li>@tools:sample\/surnames<\/li>\n<li>@tools:sample\/full_names<\/li>\n<li>@tools:sample\/avatars<\/li>\n<\/ul>\n<p>In a future release you will be able to define your own source of data.<\/p>\n<h2>What is Coming Next<\/h2>\n<ul>\n<li><a href=\"https:\/\/developer.android.com\/topic\/libraries\/architecture\/navigation\/navigation-implementing#Tour\">Navigation Editor<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/training\/constraint-layout\/\">Constraint Layout Editing<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=ytZteMo4ETk#t=28m58\">MotionLayout<\/a> with more animation tools.<\/li>\n<li>Faster Designer Startup<\/li>\n<li>More `tools:` Attributes Support<\/li>\n<li>Easier use of Android Jetpacks\/Support Libraries<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Enjoy this post? Discuss any questions or comments on the <a href=\"https:\/\/forums.xamarin.com\/128565\/what-s-new-in-the-xamarin-android-designer\">Xamarin Forums<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Backed by your feedback, our team has been able to improve the Xamarin Android Designer significantly since it&#8217;s initial release a few years back. Now, we have a ton of new and exciting work that we can&#8217;t wait to share with you. Xamarin Android Designer All of the following features are currently available in the [&hellip;]<\/p>\n","protected":false},"author":551,"featured_media":39167,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[5],"class_list":["post-37239","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","tag-android"],"acf":[],"blog_post_summary":"<p>Backed by your feedback, our team has been able to improve the Xamarin Android Designer significantly since it&#8217;s initial release a few years back. Now, we have a ton of new and exciting work that we can&#8217;t wait to share with you. Xamarin Android Designer All of the following features are currently available in the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/37239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/551"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=37239"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/37239\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/39167"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=37239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=37239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=37239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}