Is there an hot reload alternative for Xamarin.Android? - android

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

Related

Shared Images and Sounds in Xamarin with Xamarin Forms

we are currently working on a multi platform app for a university project and decided on using Xamarin. Our Database with sqlite as well as the business logic and shared resources should lie in xamarin forms, where as the View Controller and View are in the native xamarin.android and xamarin.Ios.
We can't seem to be able to use the Xamarin.Forms Images in the native ImageView on Android.
When going through the EmbeddedImages Section in the Xamarin Documentation (https://learn.microsoft.com/de-de/xamarin/xamarin-forms/user-interface/images?tabs=windows)
the following C# Code doesn't seem to work in our project.
var embeddedImage = new Image { Source = ImageSource.FromResource("WorkingWithImages.beach.jpg", typeof(EmbeddedImages).GetTypeInfo().Assembly) };
We can set the source to IamgeSource.FromResource("source") but typoeof(EmbeddeImages)... doesn't work. Even though the BuildAction is properly set to Embedded resource.
Also we can't really get the point of the "Using XAML" Section, where to put the C# code, as well as the XAML.
That's why we tried to convert the Xamarin.Forms.Image handed over from the logic into a bitmap using:
https://medium.com/#hakimgulamali88/a-helper-for-converting-a-xamarin-forms-imagesource-to-the-respective-native-images-56a5aaf98156
But when debugging the app turns black and the console shows multiple threats being started and finished. App stays unresponsive.
Are there any suggestions?
We appreciate any help. Thank you.

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

Unable to open designer view in visual studio xamarin

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.

Mono for Android - Layout Designer Issue

I'm using Mono for Android 4.2.4 with VS 2010. The layout designer does not refresh properly if you change the theme, API version, orientation or device name from the designer toolbar. MonoDevelop works fine.
Is there a resolution for this?
I have not seen one. There are other issues as well, if you modify a xaml file and change widows without saving it, your changes will disappear! While Monodroid is an awesome tool, there are still a few bugs

Android user interface on xml

Hello i am trying to create a android app and I need some help to start, i would like to know if there is some software which i can use to create all the buttons and other stuff connected with the user interface on xml .
thanks in advance.
There is no way to auto- design the desired layout, u can drag the view in layout editor for the ease , so that the xml declaration is half done.
Then you explicitly need to design and align the layout item as required.
You can follow the link here http://developer.android.com/guide/topics/ui/layout-objects.html
If you are using eclipse then it provides the drag and drop options for creating UI in xml.
You can also take the help of DroidDraw software to generate the XML.
Yes, you can do that.
Assuming that you already have Eclipse IDE, navigate to:
/src/res/layout/main.xml
and switch to Graphical Layout (you can find it just below your XML code editor. Note that you might need to adjust something else, so you need to go back to XML editor anyway :)
Only 2 development softwares are popularly used for android development these are as follows,
Google Eclipse IDE & Intellij Android Studio
above both these softwares are good for android application development.
i personally suggest you to prefer Eclipse IDE for development of android application that will help you to provide all possible solutions

Categories

Resources