How to create apps with same look and feel across platforms with Nativescript - nativescript

I just recently decided to give NativeScript a try since I want to re-use my exp with Angular, but I wanted to know if it's possible to create an app that has the same or most similar styling across devices, like Youtube or Instagram for example, they are practically the same screens in different devices. If that's possible can I get a high level explanation of how this can be accomplished with NativeScript? I followed some tutorials and the first thing you notice is how the different tags translate to the different native components between Android and iOS, they are a lot of times very very different in style.
Edit: See the examples I gave, youtube and Instagram, I'm not talking about bringing Android materials to iOS or vice-versa. I'm talking about having a specific styling equal in both platforms.

Okay so I found that the best way to do this is by using platform-specific css to tweak and modify in order to achieve the same look in both platforms, more info here Platform-Specific CSS

Related

Is it really possible to use Xamarin Forms to share all views and view controllers?

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.

How to print the current UI of Xamarin form crossplatform application

I want to print the current UI of a Xamarin.Forms cross-platform application. Are there any plugins or libraries available which support both android ios and uwp projects to do this? I'd really appreciate being pointed in the right direction to get started on implementing this kind of feature in my application.
I would approach this in two steps. Firstly you need to convert the current visuals into a printable file type. So assuming we are working with primarily mobile devices then we should make use of the 'screenshot' mechanisms.
There is a very good answer to another stack overflow account HERE that guides you through setting up screenshots in xamarin forms using dependancy injection. The chaps answer is straight forward and easy to follow.
Once you have that screenshot as a png or jpeg etc. It's time to print it. There are a lot of threads on xamarins developer forums dedicated to the issues around printing from xamarin, a collection of these can be found HERE.
So to start with it's worth mentioning that every platform xamarin forms (XF)supports has it's own mechanism for printing. XF does not provide any abstractions for printing in a cross-platform manner. You will need to write printing logic for each layer and expose it to XF using DependencyServices.
Android Printing - this is a link to printing in android.
iOS Printing - this is a link to printing in iOS (Heres a sample app to help you as well.)
As I previously mentioned, because xamarin hasn't created a simple cross-platform mechanism for this in Forms, it's not quite as simple as you'd think and does require some work to implement. But none of the work is overly complicated, it uses standard dependancy patterns, it's really just the bulk of code required that can seem a bit daunting.

Xamarin Sample Apps for iPad and iPhone?

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.

Best way to approach WP7 app development?

I have some knowledge of basic PHP developing however right now I am thinking about developing a phone app. I do however have a bit of a conundrum in that I love WP7 and I have so many ideas for features which can't be done on iOS and Android, however at the same time I am completely aware that my target users (filmmakers) generally have iOS or android phones.
Is there a way I can develop the app, which I will get a developer to do rather than myself, with WP7 as the lead platform and then make a relatively simple conversion to the other platforms or do apps generally have to be completely reworked for each platform?
Also, just to though it out there, any idea of where to go to find a freelance app developer?
Thanks
James
I think you have a few options, but the first question I would have is: where comes the data from. Are you the owner of the data, and do you already have a datasource from where you can get the data from? If not I would suggest take some time to write a decent 'backend' from which the different platforms easily can get the data from.
Also all different platforms have their own pro/cons which you cannot share that easily. If you build a WP7 app in silverlight/xna, you cannot directly port it to a ios/android variant, also functionality will probably look/react different. You will need different solutions foreach platform with this approach.
Another option would be to use an platform like phonegap which can create a solution that will work on multiple platforms. (It uses HTML5 to get it work on the different platforms)
Build your app on iOS and android first, and when you have an app to base WP7 development then contact a developer that has made similar apps to yours.

Web GUI frameworks for Phone development

I looked already and couldn't find anything good.
So a question is, are there any good web frameworks that would allow to easily develop GUI for the majority of high end phones? By this I mean
It would have to work "the same" on majority of high end phones (forget the low cost ones)
It would have to simplify the development and hide the ugly details from developer
Clear design and good documentation. Also some stability on the market.
The focus is on good looking and easy to make GUI. Javascript is only a plus.
So basically I am looking for something like jQuery or maybe ExtJS for phone development.
EDIT:
It would be a big plus if it could be consumed in Delphi
EDIT 2:
If it was not clear, I am looking for a web base solution that would run in a browser. So the target is HTML output and not native code.
To contribute to the subject. I found a question that has answers to such topic:
iWebkit vs. JQTouch vs. iUI
So there seem to be the following frameworks:
iUI
jQTouch
WebApp.net
iWebKit
Yahoo! Blueprint
JQTouch
PhoneGap
Sencha Touch
jQueryMobile
PhoneGap supports a wide variety of phones but it does so by making native (or interpreted I don't know) code to run on them, so it is a no go for me.
Yahoo! Blueprint supports a lot of phones also, but seems to need a special framework to run on. So also a no go.
jQTouch and WebApp.net look promissing, but they only support webkit based browsers. Yes these are in majority these days probably, but Blackberry for one has non webkit based browser and Blackberry is very important to me.
I will keep looking, in the meantime, don't be shy to contribute ;)
EDIT
Found this wiki about some frameworks. Most are embedded.
http://en.wikipedia.org/wiki/Multiple_phone_web_based_application_framework
EDIT2
I added Sencha Touch (www.sencha.com/products/touch) to the list as it was added after this post was created. They are the former ExtJS and now have the WebKit based mobile solution.
EDIT3
I added jQuery Mobile (http://jquerymobile.com/) to the list as it was added after this post was created.
Sencha Touch seams to be the solution. Since UniGui for Delphi/Lazarus already supports eye catching ExtJS it would be ideal if it extends to Sencha Touch. We will see.
I'm confused, do you want a web framework that runs on the web for phones (like jqTouch), or are you looking for something that will create native apps provides some amount of portability (like MonoTouch/C#)?
lightweight jquery-like alternative that works on android & iphone (& possibly blackberry & winmo) is xui, cfr. http://xuijs.com/documentation and http://github.com/brianleroux/xui.
edit: xui is more about javascript and less about a good looking GUI, so this might not be what you're looking for after all.
http://jquerymobile.com/
... when its released in "Late 2010".

Resources