i have an existing project on others pc, however, when i move the project files into another computer, the project itself unable to show the drag and drop view in the xaml file, it show the code view instead of drag and drop, how should i do to make let me see the designer view??
Are you using the Core Framework of xamarin or Xamarin Forms ? (I'm asking because you are talking about xaml files instead of xml)
If you are using the Core Framework juste have a look to this link coming from the xamarin documentation :
https://developer.xamarin.com/guides/android/user_interface/designer_overview/designer_walkthrough/
One last thing, instead of copying the files use a version management tools if is not the case (like github or bitbucket)
The installed Android SDK is probably too old. Consider updating it.
Related
I'm aware that when developing in Xamarin.Forms I have available some tools for hot reloading, such as:
https://github.com/AndreiMisiukevich/HotReload
https://marketplace.visualstudio.com/items?itemName=Xamarin.XamarinLiveReload
https://www.livexaml.com/
However I wasn't able to find an equivalent alternative for Xamarin.Android. Is there an alternative out there that I can use for hot reloading on Xamarin.Android?
There's two ways of creating a layout in Xamarin Android:
Using axml layouts - If you upgrade to the latest Xamarin & Visual Studio on a Mac, you will notice that the designer view for a layout gets updated in real time with the axml code. So technically it's live reloading.
Inside the fragment(CS file) - For this you can use Continuous, as you can see it in use here. Ryan Davis is available on Twitter, and he's pretty quick to respond
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
I started off with a black activity and whenever I try using Android studio, I get stuck in this screen. I cant drag any widgets, enter any text, or make any changes to the user interface. Is there anything I am missing? I downloaded all the Android Studio bundle and I have all the required SDK tools. I have attached a screenshot of what I am currently stuck with.
A screenshot of what I am seeing:
Recently I encountered the same problem myself. After some research I found that you must now use the "content_activityname.xml" file in order to edit the ui of an activity.
In your case this file is located in the layout folder, right under your activity_main.xml in the picture provided.
According to this thread: What is the role of content_main.xml in android studio 1.4? the main.xml now contains the global look of the ui, and also contains the content.xml file which again contains the components of the ui.
You should think of uninstall and reinstall Android Studio and after that creating a new Project. You also are able to look at some tutorials created by the creators of AS. They can be found at Android Developers.
By saying visual I mean if there is a sort of option of seeing how the app might look on your phone while developing it using android developer tools kit downloaded from android website? I hope you got the question clear
Yes. You are building the layout with XML.
While you are developing you can switch between XML view and a graphical view.
This is in eclipse. Android studio hase something similar.
There is an layout preview in Eclipse where you could choose from a variety of predefined "devices". Also you could add your own.
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.