I need to implement something like iOS AutoLayout engine in my project. The problem is not the same, but I hope that the implementation idea will be helpful for me.
I'll be grateful for any help.
Related
I apologize if this is somewhat too open-ended of a question, but I'm still parsing everything about the Xamarin framework and it's hard to know even what to ask.
Everything I've read claims it's possible to, in theory, write a Xamarin app that has the same views and view controllers for both Android and iOS. The app I am developing has a very comprehensive design that uses almost no native look and feel, so I understand I will need to override the default platform's L&F. Because of this, it seems an ideal candidate to reuse everything for both device platforms, and Xamarin.Forms seems the ideal candidate.
However, I've yet to find a good example that does this. Even all of Microsoft's official examples of Xamarin.Forms (such as https://github.com/xamarin/xamarin-forms-samples/tree/master/BoxView/BasicBoxView) use ViewControllers/AXML files for iOS/Android. Huh? Isn't the point of Forms so I don't have to do that? Why are they mixing Forms and the native Xamarin in an example targeted towards Forms? Is this a sign it's not really possible?
Xamarin seems very flexible, which is great, but I'm also finding it confusing determining what will work together and what will not, plus how to determine the best solution.
Thanks.
I'm on the cusp of beginning a Xamarin project. I have been doing loads of research on what the best starting point would be and i have come to the conclusion that i need to learn the Android framework and begin by building a native Android app in Xamarin instead of Xamarin.Forms.
However, looking to the future i would want to be cross platform for this app. I have searched high and low on any information about what it would take to take a Xamarin.Android app and migrate it into a Xamarin.Forms app so that i can then build out the iOS app for my project.
Does anyone have any information on if this process is easy or hard to do? Can you take a Xamarin.Android app and someone migrate it to a Xamarin.Forms project? And if not would the approach be to rebuild the apps under a Xamarin.Forms project? Is there a easy approach to this?
Any info on this would be greatly appreciated.
With more than two years of experience with Xamarin (Native and Forms), I have never seen a tool or anything of any sort that will help you with migration but I can give you my personal opinion on this and maybe help you a little. Let's begin.
I have been doing loads of research on what the best starting point would be and I have come to the conclusion that I need to learn the Android framework and begin by building a native Android app in Xamarin instead of Xamarin.Forms
I would say this was a good decision Since my personal experience tells me that it is crucial for you to know either Android or iOS before you start working with Xamarin Forms otherwise there will be points in time where you will be lost af seeing the code, thinking how did you get yourself into this mess ;)
I have searched high and low on any information about what it would take to take a Xamarin.Android app and migrate it into a Xamarin.Forms app so that I can then build out the iOS app for my project.
There is no direct way of doing this you will have to do it the old fashioned way...
Converting(Manually) Android XML to XAML is quite easy so the design won't be an issue.
The C# part might be a problem as a native Android code is quite different to forms, But you can do it with ease with time.
Note: That there will be a lot of stuff that you would want to keep in mind for eg how Xamarin.Forms works. Because when you start doing the changes you will face a lot of issues finding equivalents and stuff but it will get easier
Does anyone have any information on if this process is easy or hard to do?
It's not about hard or easy it's about time taking or not and trust me it takes time.
Can you take a Xamarin.Android app and someone migrates it to a Xamarin.Forms project?
I am a little bit confused by this part of the question but if you mean is it possible yes it is.
My comments:
You will need good knowledge of how Xamarin.Forms work and by that I mean you should at least go through all the Xamarin.Forms guides in Xamarin University which can be completed in a week or so with proper understanding.
Going forward I would say use an MVVM framework for your Forms app, it will help you have a well-structured code and will keep you up to date with the industry standard.
Also, note that MVVMCross for a beginner in MVVM is too complex, so avoid it if you have no idea what MVVM is, going with Prism or FreshMVVM would be comparatively easier.
Don't depend too much on Xamarin.Forms NuGet's for doing certain functionalities.
Rather write your own code using Plugins for everything is too much dependency and becomes a problem at crucial times.
How can I write separate styles for iphone 6 and higher devices in vanilla nativescript. ??
I tried "page.ios.minW1080" but didn't work for me.
Any suggestions !!
Thank You.
For anyone interested in the answer to this question - Sagar1911 has found a solution and posted it here
I wonder why none of the Xamarin Prebuilt Apps at https://www.xamarin.com/prebuilt support both iPad and iPhone? They all have the same design on each resolution. Especially Apps like 'Acquaint' would be perfect on iPad to have the contact list on the left and the details on the right. But instead it just has the same design like the iPhone Version.....
Are there any reasons why Xamarin does not offer samples with different designs depending on the client resolution? Are there somewhere else some examples?
Many thanks!
You might want to take a look at our Creating Mobile Apps with Xamarin.Forms Book First Edition by Charles Petzold.
I work on the same team as Charles and I know it's a topic he's covered in detail. The full book should be available soon too.
BTW, we are looking into creating some detailed, annotated cross-platform app samples that do all the goodies that a typical modern app would be expected to have.
I do not know of any of the stock Xamarin examples that use OnIdiom, but it just a matter of time to code them...hahahah, always just a matter of time and code. (I'm sure the Xamarin guys can chime in on this one):
Xamarin.Forms.OnIdiom Class
<OnIdiom.Phone>Vertical</OnIdiom.Phone>
<OnIdiom.Tablet>Horizontal</OnIdiom.Tablet>
In terms of finding examples that use the Xamarin.Forms XAML OnIdiom I would search Github for OnIdiom, there a few OSS examples of phone/tablet switching floating around there as I used at least one as a template to do a quick phone/tablet prototype for a client.
I am looking for some design ideas for a layout. Are there any web sites that people here would recommend that I should refer? The app is simply a question and answer type app. There is a question with 4 answers as a radio button.
Any help would be appreciated
thanks
jQuery mobile if you are looking for what to use.
I don't think that anyone here will tell you how to design it. It's up to you.
Here's a couple of resources that may help: http://mobilegui.net and http://iphoneized.com