[{"data":1,"prerenderedAt":334},["ShallowReactive",2],{"article-xamarin-no-intellisense-in-axml-files":3},{"article":4,"tags":79,"previous":94,"next":240},{"id":5,"title":6,"author":7,"body":8,"createdAt":67,"description":68,"extension":69,"img":70,"meta":71,"navigation":72,"path":73,"seo":74,"stem":75,"tags":76,"updatedAt":67,"__hash__":78},"articles\u002Farticles\u002Fxamarin-no-intellisense-in-axml-files.md","Xamarin No Intellisense in Xaml files","[object Object]",{"type":9,"value":10,"toc":63},"minimark",[11,19,32,58],[12,13,14,18],"p",{},[15,16,17],"strong",{},"Issue: ","Opening up AXML file and no intellisense in Visual Studio",[20,21,22,26,29],"ul",{},[23,24,25],"li",{},"open file explorer, navigate to c:\\program files (x86)\\MSBuild\\Xamarin",[23,27,28],{},"copy android-layout-xml.xsd and schemas.android.com.apk.res.android.xsd to C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Xml\\Schemas",[23,30,31],{},"XML – Schemas and Add selecting the 2 xsd files",[33,34,35,36,35,49,35],"blockquote",{},"  \n",[37,38,40],"a",{"href":39},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin_bee7-image_thumb-3-_2.png",[41,42],"img",{"style":43,"src":44,"border":45,"alt":46,"title":46,"width":47,"height":48},"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border: 0px;","\u002Farticles\u002Fimages\u002Fimages\u002Fwindows-live-writer-xamarin_bee7-image_thumb-3-_thumb.png",0,"image_thumb[3]",240,111,[37,50,52],{"href":51},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin_bee7-image_thumb-6-_2.png",[41,53],{"style":43,"src":54,"border":45,"alt":55,"title":55,"width":56,"height":57},"\u002Farticles\u002Fimages\u002Fimages\u002Fwindows-live-writer-xamarin_bee7-image_thumb-6-_thumb.png","image_thumb[6]",414,112,[20,59,60],{},[23,61,62],{},"Restart Visual Studio and your intellisense should be working now.",{"title":64,"searchDepth":65,"depth":65,"links":66},"",2,[],"2016-02-07T06:35:18.3500000-05:00",null,"md","\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin_bee7-image_thumb-3-_thumb.png",{},true,"\u002Farticles\u002Fxamarin-no-intellisense-in-axml-files",{"title":6,"description":68},"articles\u002Fxamarin-no-intellisense-in-axml-files",[77],"xamarin","d2O3r4wtEPfVXQIoN_pal9vSxXjlFioRYQ0UIQJX7IQ",[80],{"id":81,"title":82,"body":83,"description":87,"extension":69,"img":88,"meta":89,"name":77,"navigation":72,"path":90,"seo":91,"stem":92,"__hash__":93},"tags\u002Ftags\u002Fxamarin.md","Xamarin",{"type":9,"value":84,"toc":85},[],{"title":64,"searchDepth":65,"depth":65,"links":86},[],"Xamarin is an open-source platform for building modern and performant applications for iOS, Android, and Windows with . NET. Xamarin is an abstraction layer that manages communication of shared code with underlying platform code.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fxamarin",{"description":87},"tags\u002Fxamarin","deVB66I7cJMtWvqybFh5POf9LBCBwHNe-5ZGMOzV5G4",{"id":95,"title":96,"author":7,"body":97,"createdAt":232,"description":233,"extension":69,"img":111,"meta":234,"navigation":72,"path":235,"seo":236,"stem":237,"tags":238,"updatedAt":232,"__hash__":239},"articles\u002Farticles\u002Fxamarin-android-use-toolbar-in-place-of-actionbar.md","Xamarin Android - Use Toolbar in place of ActionBar",{"type":9,"value":98,"toc":230},[99,117,124,140,145,148,165,171,176,203,214,217,221],[12,100,101,102,105,114,116],{},"Add references to Xamarin.Android.Support.v7.AppCompat (this will also include Xamarin.Android.Support.v4)",[103,104],"br",{},[37,106,108],{"href":107},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_2.png",[41,109],{"style":110,"src":111,"border":45,"alt":112,"title":112,"width":47,"height":113},"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;","\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_thumb.png","image",209,[103,115],{},"\nOpen Main.axml adding the following toolbar element",[118,119,123],"pre",{"className":120},[121,122],"brush:","xml;","\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>  \n\u003Candroid.support.v7.widget.Toolbar xmlns:android=\"http:\u002F\u002Fschemas.android.com\u002Fapk\u002Fres\u002Fandroid\"  \n    xmlns:app=\"http:\u002F\u002Fschemas.android.com\u002Fapk\u002Fres-auto\"  \n    android:id=\"@+id\u002Ftoolbar\"  \n    android:layout_height=\"wrap_content\"  \n    android:minHeight=\"?attr\u002FactionBarSize\"  \n    android:background=\"?attr\u002FcolorPrimary\"  \n    android:layout_width=\"match_parent\" \u002F>",[12,125,126,127,129,137,139],{},"Opening in the designer we have",[103,128],{},[37,130,132],{"href":131},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_4.png",[41,133],{"style":110,"src":134,"border":45,"alt":112,"title":112,"width":135,"height":136},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_thumb_1.png",296,117,[103,138],{},"\nUpdating MainActivity.cs",[118,141,144],{"className":142},[121,143],"csharp;","using System;  \nusing Android.App;  \nusing Android.Content;  \nusing Android.Runtime;  \nusing Android.Views;  \nusing Android.Widget;  \nusing Android.OS;  \nusing SupportToolbar = Android.Support.V7.Widget.Toolbar;  \nusing Android.Support.V7.App;  \nusing Android.Support.V4.Widget;  \nusing System.Collections.Generic;  \n  \nnamespace AppDave  \n{      \n    [Activity(Label = \"AppDave\", MainLauncher = true, Icon = \"@drawable\u002Ficon\", Theme=\"@style\u002FMyTheme\")]  \n    public class MainActivity : ActionBarActivity  \n    {  \n        private SupportToolbar _toolbar;  \n  \n        protected override void OnCreate(Bundle bundle)  \n        {  \n            base.OnCreate(bundle);                      \n            SetContentView(Resource.Layout.Main);  \n  \n            _toolbar = FindViewById\u003CSupportToolbar>(Resource.Id.toolbar);  \n            \u002F\u002Fsets the actionbar to our toolbar  \n            SetSupportActionBar(_toolbar);    \n            \u002F\u002Fwe can now call our toolbar via SupportActionBar  \n            SupportActionBar.Title = \"MyToolbar\";  \n        }  \n  \n        public override bool OnCreateOptionsMenu(IMenu menu)  \n        {              \n            MenuInflater.Inflate(Resource.Menu.action_menu, menu);  \n            return base.OnCreateOptionsMenu(menu);  \n        }  \n    }  \n}",[12,146,147],{},"Notes:",[20,149,150,153,156,159,162],{},[23,151,152],{},"I am deriving from ActionBarActivity instead of Activity (see above)",[23,154,155],{},"I am using a styles.xml. This will be used to specify the theme that will be applied to the activity.  The theme will inherit from the AppCompat.Light theme. Then at this point we can override the default values for that theme.",[23,157,158],{},"Note: instead of specifying .NoActionBar as shown below I have read that you can also specify the parent as Theme.AppCompat.Light then the first attribute would be \u003Citem name=”windowActionBar”>false\u003C\u002Fitem>  I found however by specifying no action bar in this manner I had the following exception “Java.Lang.IllegalArgumentException: AppCompat does not support the current theme features”.  As a result I did have to use the .NoActionBar option as shown in the xml snippet.",[23,160,161],{},"SetSupportActionBar will be used to actually set the action bar to our toolbar.  At this point, SupportActionBar will be used to call the toolbar.",[23,163,164],{},"In order to get the action menu to be inflated on the toolbar use public override OnCreateOptionsMenu",[33,166,35,167,35],{},[118,168,170],{"className":169},[121,122],"\u003C?xml version=\"1.0\" encoding=\"utf-8\" ?>  \n\u003Cresources>    \n  \u003Cstyle name=\"MyTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">   \n    \u003Citem name=\"colorPrimary\">#2196F3\u003C\u002Fitem>  \n  \u003C\u002Fstyle>  \n\u003C\u002Fresources>  \n",[20,172,173],{},[23,174,175],{},"The menu within the toolbar is also specified via action_menu.xml.  This will be the quick menu on the top right.",[33,177,35,178],{},[118,179,181,182],{"className":180},[121,122],"\u003C?xml version=\"1.0\" encoding=\"UTF-8\" ?>  \n\u003Cmenu  \n    xmlns:android=\"http:\u002F\u002Fschemas.android.com\u002Fapk\u002Fres\u002Fandroid\"  \n    xmlns:app=\"http:\u002F\u002Fschemas.android.com\u002Fapk\u002Fres-auto\">  \n",[12,183,184,185,187,188,190,191,193,194,196,197,199,200,202],{},"\u003Citem android:id=\"@+id\u002Faction_help\"",[103,186],{},"\nandroid:icon=\"@drawable\u002Fic_action_help\"",[103,189],{},"\nandroid:title=\"Help\"\u002F>",[103,192],{},"\n\u003Citem android:id=\"@+id\u002Faction_refresh\"",[103,195],{},"\nandroid:icon=\"@drawable\u002Fic_action_refresh\"",[103,198],{},"\nandroid:title=\"Refresh\"\u002F>",[103,201],{},"\n\u003C\u002Fmenu>",[12,204,205],{},[37,206,208],{"href":207},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_6.png",[41,209],{"style":210,"src":211,"border":45,"alt":112,"title":112,"width":212,"height":213},"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;","\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_thumb_2.png",199,318,[12,215,216],{},"Note: in the above action menu we did not override the app : showAsAction element.  If I specify showAsAction in the following manner you can see the differences.  When specifying as never the icon is visible to the left of the …",[118,218,220],{"className":219},[121,122],"\u003C?xml version=\"1.0\" encoding=\"UTF-8\" ?>  \n\u003Cmenu  \n    xmlns:android=\"http:\u002F\u002Fschemas.android.com\u002Fapk\u002Fres\u002Fandroid\"  \n    xmlns:app=\"http:\u002F\u002Fschemas.android.com\u002Fapk\u002Fres-auto\">  \n  \n  \u003Citem android:id=\"@+id\u002Faction_help\"  \n        android:icon=\"@drawable\u002Fic_action_help\"  \n        android:title=\"Help\"  \n        app:showAsAction=\"always\"  \n        \u002F>  \n  \n  \u003Citem android:id=\"@+id\u002Faction_refresh\"  \n        android:icon=\"@drawable\u002Fic_action_refresh\"  \n        android:title=\"Refresh\"  \n        app:showAsAction=\"never\"  \n        \u002F>  \n\u003C\u002Fmenu>  \n",[12,222,223],{},[37,224,226],{"href":225},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_8.png",[41,227],{"style":210,"src":228,"border":45,"alt":112,"title":112,"width":47,"height":229},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-xamarin-android-use-toolbar-in-place-o_b87d-image_thumb_3.png",77,{"title":64,"searchDepth":65,"depth":65,"links":231},[],"2016-02-07T09:50:32.1900000-05:00","A toolbar in place of an actionbar with a menu, the end result.",{},"\u002Farticles\u002Fxamarin-android-use-toolbar-in-place-of-actionbar",{"title":96,"description":233},"articles\u002Fxamarin-android-use-toolbar-in-place-of-actionbar",[77],"3MdES8JhgEfxYHKgSOClj6WwiA-BKs6xZS5LaqZ_HSc",{"id":241,"title":242,"author":7,"body":243,"createdAt":327,"description":68,"extension":69,"img":302,"meta":328,"navigation":72,"path":329,"seo":330,"stem":331,"tags":332,"updatedAt":327,"__hash__":333},"articles\u002Farticles\u002Fxamarin-please-install-package-android-support-library.md","Xamarin Please install package ‘Android Support Library’",{"type":9,"value":244,"toc":325},[245,248,286,305,313,321],[12,246,247],{},"  My Xamarin Android project would not build.  The build output had the following exception\u002Ferror.\nSeverity Code Description Project File Line Suppression State Error",[118,249,253],{"className":250,"code":251,"language":252,"meta":64,"style":64},"language-html shiki shiki-themes github-light github-dark","Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. \nAndroid resource directory C:\\Users\\{username}\\AppData\\Local\\Xamarin\\Android.Support.v4\\22.2.0\\embedded\\.\u002F doesn't exist.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \nC:\\Program Files (x86)\\MSBuild\\Xamarin\\Android\\Xamarin.Android.Common.targets 349&nbsp;&nbsp;&nbsp;  \n","html",[254,255,256,265,277],"code",{"__ignoreMap":64},[257,258,261],"span",{"class":259,"line":260},"line",1,[257,262,264],{"class":263},"sVt8B","Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. \n",[257,266,267,270,274],{"class":259,"line":65},[257,268,269],{"class":263},"Android resource directory C:\\Users\\{username}\\AppData\\Local\\Xamarin\\Android.Support.v4\\22.2.0\\embedded\\.\u002F doesn't exist.",[257,271,273],{"class":272},"sj4cs","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",[257,275,276],{"class":263}," \n",[257,278,280,283],{"class":259,"line":279},3,[257,281,282],{"class":263},"C:\\Program Files (x86)\\MSBuild\\Xamarin\\Android\\Xamarin.Android.Common.targets 349",[257,284,285],{"class":272},"&nbsp;&nbsp;&nbsp;\n",[12,287,288,289,295,296],{},"I started to get this error after adding the component Android Support Library v7 AppCompat (version 22.2.0.0) This component has dependencies on Xamarin.Android.Support.v4.\nAfter much time and looking at Android SDK’s ",[15,290,291],{},[292,293,294],"u",{},"the resolution"," was to remove the respective zip file from this directory\nC:\\Users{username}\\AppData\\Local\\Xamarin\\zips. Once I did this, a fresh build would re-download this package and unzip appropriate references\nto C:\\Users{username}\\AppData\\Local\\Xamarin.  In addition you can delete everything in the C:\\Users{username}\\AppData\\Local\\Xamarin\\Android.Support.v4 directory.\n",[37,297,299],{"href":298},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-245aeb9a3723_fde8-image_6.png",[41,300],{"title":112,"style":301,"border":45,"alt":112,"src":302,"width":303,"height":304},"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px","\u002Farticles\u002Fimages\u002Fwindows-live-writer-245aeb9a3723_fde8-image_thumb_2.png",294,88,[37,306,308],{"href":307},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-245aeb9a3723_fde8-image_4.png",[41,309],{"title":112,"style":301,"border":45,"alt":112,"src":310,"width":311,"height":312},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-245aeb9a3723_fde8-image_thumb_1.png",411,50,[37,314,316],{"href":315},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-245aeb9a3723_fde8-image_2.png",[41,317],{"title":112,"style":301,"border":45,"alt":112,"src":318,"width":319,"height":320},"\u002Farticles\u002Fimages\u002Fwindows-live-writer-245aeb9a3723_fde8-image_thumb.png",417,233,[322,323,324],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":64,"searchDepth":65,"depth":65,"links":326},[],"2016-02-06T12:29:47.8100000-05:00",{},"\u002Farticles\u002Fxamarin-please-install-package-android-support-library",{"title":242,"description":68},"articles\u002Fxamarin-please-install-package-android-support-library",[77],"8pRh1b0XfQH5mWwb5lohfycB3F0kfUGsZ2iKu_RUjUQ",1781574770986]