ReactNative : How to design UI support all devices iOS and android - user-interface

I am developing react native app. I wanted to know about design screens that is automatically adjust to iOS and android devices. For example we are using auto layout for iOS apps which gives consistent view for all iPhones and iPads.
I am little bit confused about designing screens for android and iPhones. I know how to design UI for Native platform that is consistent for all devices.

Yes, you can create UI for both Android and IOS devices using the same js file.
Mainly u need to have a good idea about flexbox. It is the base of creating responsive UI for compatible all devices. Follow below tutorials and get a good idea about flexbox and design responsive UI
https://facebook.github.io/react-native/docs/flexbox
https://medium.com/the-react-native-log/a-mini-course-on-react-native-flexbox-2832a1ccc6
and You can find a good example of components https://github.com/jondot/awesome-react-native here.

Related

How to adjust layouts in xamarin.forms so that it can fit into any phone

Hi I am working on a xamarin.forms cross platform app and I am not able to get proper UI If I check the same app on other phone there is misalignment in the buttons.Is there any code that can be used so the buttons look fine in all phones ?
Thanks
Making a responsive mobile app UI could actually be a challenge somehow. These two links however, might be helpful:
Adaptive UI with Xamarin.Forms
Tips for Building Adaptive Xamarin.Forms Apps

Does Xamarin support to develop apps for Windows surface and how well?

I want to develop an app for Windows surface tablet and iOS mobile and iPad.
As I am a new user to Xamarin, when I created my first project,it shows 3 projects:-
hello.driod, hello.ios and hello.winPhone.
I have 3 questions based on this:-
How will I be able to write the same code and share for windows 8.1 and iOS?
and whenever I drag and drop the elements to the UI page, will the same elements be copied to both windows and iOS simultaneously or I got to add them seperately?
Currently I dont have a MAC to connect to my PC. Can I write the code and and there while testing it, connect it to a MAC or should it be connected during the whole process?
Please Help!
Using the same code depends on how your structure your app.
You can go the native route where you can share the bulk of your logic by containing it in a shared / PCL project (more on that here), but have platform specific code for your UI.
For example, if you have a cross platform app targeting iOS and Android you would still create the UI in a storyboard for iOS and AXML files for Android. Any code you want to "connect" to your UI would be specific to that platform as you would use the platform APIs. Any code that is not platform specific (i.e., not calling iOS or Android APIs) can go in your shared / PCL project.
Or you can choose Xamarin.Forms which adds a layer of abstraction by allowing you to write the UI in XAML once and have it work on all platforms. The advantage is increased code sharing as now your UI is also shared. The downside is to utilise platform specific features you'll need to implement DependencyService or custom renderers. Read more about Xamarin.Forms here.
As above, it depends. If you are going the native route, then no. If you are going with Xamarin.Forms, then you are using the same XAML code for the UI across platforms, but there is no drag and drop designer.
To build an iOS app you need to be connected to a Mac. You will also need to be connected to a Mac to use the iOS Designer.

Xamarin.Forms on Windows not loading styles from App.Xaml

We have a Xamarin based app targeting iOS, Android, and Windows (not WinPhone but Windows 8.1 as a desktop app for now).
The app utilizes a few PCL's for the vast majority of all views and view models and reusable functionality. The three platform specific projects have very little custom code and, when necessary, inject in custom platform specific services. One of the PCL's also has an App.Xaml that provides the basic styles for the overall app.
The iOS and Android apps load this App.Xaml fine and honor all styles. The Windows implementation of Xamarin.Forms does not appear to load or honor the styles in the same way and our core UI appears blank.
This isn't an issue of the styles just "don't look right" on Windows compared to the other platform but more an issue of everything is invisible. We can click buttons and move around if we know where they would be in the overall UI but we don't see them. Not even an outline.
Not sure what other implementation info I can provide but I'm wondering if anyone else has had issues with Xamarin.Forms on windows and styles?

Multi resolution splash screen, tiles and App icons for Windows Phone 7

I'm developing an application which must work for both WP7 and WP8. And want to create multi resolution splashscreen and Tiles. I know that it can be done easily for WP8 (http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769511(v=vs.105).aspx)
But how can I do it for WP7 application?
How can I make my application (developed for WP7.5) closer to WP8 but still working on WP7.5-7.8.
I just want my application looks good for both WP7 and WP8 devices.
You can run your app designed for WP7 on WP8 device too, but then you will have problems with screen resolution on some devices. You can develop two versions app WP7 and WP8. Porting is not that difficult, if correctly to this approach. In the articles you can find good advice http://www.developer.nokia.com/Community/Wiki/Maintaining_a_WP7_and_WP8_version_of_a_same_Silverlight_application and http://www.developer.nokia.com/Community/Wiki/Introduction_to_multiple-resolution_support_on_Windows_Phone_8_apps .
Since WP7 devices are all (and always will be) WVGA, there's no point to supporting multiple resolutions. What you can do, though, is support multiple tile sizes on 7.8+, and I'd suggest using Mangopollo for that.
Just reuse your WVGA tile assets from the WP8 version of your app, and make the appropriate changes in your app's WMAppManifest.xml:
<AppExtra xmlns="" AppPlatformVersion="8.0">
<Extra Name="Tiles"/>
</AppExtra>
This should be placed inside the <Deployment> tag before <App>. Then you just need to make sure to change your primary tile's type and assets on first run using Mangopollo, and to use the library when creating or updating any secondary tiles.
That's as close to multi-resolution that WP7 will ever get.

Titanium native UI on desktop

I would lie to build a desktop app with Titanium and i thought that the API would give me access to a native ui for desktop. But reading the documentation it seems like the native ui api is directed only to mobile development, while for desktop you have to build the UI yourself in html and js and it will not be native code (with the risk of low performance animation and graphic).
Am i right?
Thanks
Yes you are right. Titanium Desktop only WebKit UI is possible: HTML5+js and/or PHP/Ruby/Python. You can see Tweetanium on git to see how Desktop/Mobile application can be designed. But simply also in mobile you can use a webkit view... It'sn't fast as native UI on mobile but it makes your UI code reusable in both world.
This is exactly what happens on PhoneGap project.

Resources