.axml highlighting and intellisense not working in monodroid - android

I recently installed mono for Android and today I tried to get started. In all of the tutorials I have seen, intellisense and highlighting both work in visual studio when editing .axml files, but after an install, uninstall, and re-install, mine still isn't working. I guess I could go on like this, but it is just driving me absolutely nuts.

If you are using the default VisualStudio editor for XML, then the intellisense should come from the namespace import: xmlns:android="http://schemas.android.com/apk/res/android"
If you are using the Xamarin designer and its XML editor, however, then I don't believe that you will get any intellisense - that's a work in progress from the Xamarin team.

Related

Xamarin axml, xml Intellisense not working

I started using Visual Studio 2017 Enterprise Edition with Version 15.7.4. and Xamarin Version 4.10.0 and need to work on Xamarin native android application.
But Auto fill suggestions not coming in xml and axml files. Intellisense working for widget names(Like TextView, EditText etc.) In layout axml files. But, for widget properties (Like android:layout_width, android:gravity etc.) it isn't working. Where as in styles.xml, menu.xml suggestions not coming at all. I check with following ways.
1) XML - Schemas > android-layout-xml.xsd and schemas.android.com.apk.res.android.xsd files are exists
2) File opened as XML (Text) Editor
3) I didn't find Resharper in Tools
Also, Is there any way to change Xamarin keyboard shortcuts to Android Studio or Eclipse?
Being a Xamarin developer for almost two years I have come to terms with the fact that the Xamarin Android intellisense has never worked as it is expected.
It has a lot of bugs and issues (Links below) which have made it a real pain in the neck, But there are workarounds which you have already mentioned above and if those do not work for you trust me nothing will.
https://forums.xamarin.com/discussion/118384/android-designer-does-not-work-well
https://forums.xamarin.com/discussion/125879/designer-not-loading-layout-at-all
https://forums.xamarin.com/discussion/76851/visual-studio-2015-android-designer-not-working
https://forums.xamarin.com/discussion/82082/android-designer-not-working-in-visual-studio-enterprise-2015
https://forums.xamarin.com/discussion/6258/android-designer-doesnt-work-in-vs-2012
https://developercommunity.visualstudio.com/content/problem/99268/xamarin-android-designer-not-working.html
My suggestions:
Android studio provides you with a very strong designer and hence I would simply suggest you use Android studio to write down your XML and then just copy paste it to your Xamarin AXML/XML files and it should work like a charm, Same can be done for any other time of files such as strings or styles XML.
For changing the visual studio shortcuts you can simply check the following guide

Xamarin layout designer view not working properly

I am working on visual studio for android development on Xamarin platform. I am facing a weird issue. If I make some changes in my .axml file 2-3 times, the designer vie stops working. It keeps on loading but do not show anything. I have to restart my visual studio as admin to check the design. Any help?
There is a bug I believe in the current version of Xamarin. Most users have downgraded to 4.1.2 to fix this issue.
See this post: https://forums.xamarin.com/discussion/77992/axml-layout-designer-inside-visual-studio-keeps-loading-forever

XML Layout Misbehavior with Eclipse-ADT

I am facing something strange issue with Android XML Layout Editor.
Whenever I am switching from Graphical Layout to Code Layout, It shows everything perfectly and when I'll click or move up down via keyboard arrow keys, it behaves strange and part of xml line are becoming visible/invisible.
Xml code is there, its not changing.
Have a look at attached video link.
http://screencast.com/t/rY1gKPY9vn
My current Config :
Eclipse SDK
Version: 3.7.2
Build id: M20120208-0800
Android Development Toolkit
Version: 20.0.3.v201208082019-427395
Update :
issue is still there with Eclipse with 4.2 also
Yes, it's a known issue and I have also faced this strange issue with Eclipse, the solution to it is to close the XML file and open it again. If that doesn't work, restarting Eclipse should also solve it.
the same issue i was facing in XML file. The solution is either reopen the file. And the perfect solution is upgrade your eclipse version to JUNO. That will not create such type of irritation problem..
Have fun.

Mono for Android VS2010: Cannot view layout in designer

I installed Mono for Android with the intention of using Visual Studio 2010 to design android apps. I am able to compile and deploy applications, but I am not able to view the layout designer. When I double click on an .axml file it opens in source view and there is no context menu option such as "View in designer." I am able to use MonoDevelop to create the layout, but I shouldn't have to do that.
Here are some screen caps:
Any tips?
It seems to simple but right clicking on the Main.axml in Visual Studio and select and choose Open with. Then select Android Designer should do the trick.
Despite that Android Designer can be set as Default it appears not to be working like that. I should say that's a BUG in VS and/or Monofor Android.
Are you shure to have the latest Mono for Android installed? (Version 4.2.4)
The Open With Dialog should have an entry "Android Designer".
Select this now and click "Set as Default".
Did a full uninstall, reinstall and reboot.
At first it didn't seem to have fixed it - my existing hello world project still wouldn't open the designer.
I tried creating a new project and ta-da all good now! Very odd.
I've very pleased to have gui designer. It really helps level the learning curve when learning a new platform - nice work Xamarin.
I did 3 installs until it finally took. I uninstalled then reinstalled and it still didn't work. I then just did a repair and it finally worked. Just keep reinstalling and you'll get it.

Android: Graphical Layout not working - doesn't show anything

My situation is: I once made an android project(2.2 version) but soon needed to format my computer. After formatting, I downloaded eclipse again but when I imported my project, I wasn't able to use the 'graphical layout' menu for xml. It doesn't show me anything like the picture below.
http://img525.imageshack.us/img525/3586/19978552.png
I cleaned the project and updated the Android SDK, however, none of these seemed to work well. What could be causing this?
Try restarting Eclipse. Usually that solves the problem for me when that happens.
Right click on your layout xml file and select Open With -> Android Layout Editor. It will force eclipse to open file in android's layout editor mode
None of above worked for me. what worked for me is:
1- Select a Google APIs Project Build Target rather than one of the Android X.X ones. This setting is in right click on project -> Properties->Android.
2- Make a change in XML and save it. Now switch back to "Graphical Layout" and it will show the layout.
For some, only 2nd step works.
This Question was asked 3 year ago, I am sure that you have get your solution, however i was also facing the same problem but got the solution in eclipse, here it is:-
1)Goto help->AboutEclipse->Installation details.
2)check the version of Android DDMS, Android development tool, Android hierarchy viewer, Android native development tool, Android trace view and tracer for openGl ES in installed software tab.
3)If they have different version than you have to update all of them.
4)Goto help->check for update in eclipse and follow the instruction.
5)Then restart eclipse.
This solve my problem.
The topic seems a little bit cold, but I wanted to add it nonetheless.
I had a similar problem with my layouts recently. When i create a project it automatically creates the layouts in the latest version of Android (eclipse shows it as version 22 of android as of today). But i can't see anything. So i just change the version to, say 18, and it shows ok. Furthermore if i want to change it back to version 22 it throws and exception, saying that a class can't be instantiated. (I am probably missing a class or a library on my system.)
Therefore if you cant see the layout it might be a good idea to switch back to earlier versions for development. cheers.

Categories

Resources