Question

I'm working on the cross-platform application where common code like business logic and the other common stuff is in the common library. I need to solve prblem with UI (user interface).

Server side communication is completely implemented in the common code. Server is sending data to the application and UI is updated based on these data.

The idea is to generate views in the common code and these generated views update on the device screen.

On Android you have views defined in XML layout files stored in the resources folder. On Windows Phone 8 you have XAML defined views. On Mac/iOS it is some kind of XML i guess, but I dont have much experience on Apple platform.

So every platform supports XML-like views definition. My idea is to generate UI using XSLT transformations from input XML data to the XML/XAML view definition. I know how to do it in Windows Phone , but I dont know how to do it for Android platform.

Let's say that I need to generate Android activity layout on the server side and display this activity on the Android device screen.

Any ideas? Is that possible?

Note: I know how to dynamically create android views programmatically on Android, but I need to generate Resource\layout\main.axml somehow on the server side and apply this main.xaml file on Android in runtime.

Was it helpful?

Solution

There is no way how to do it on Android. It is not supported. Writing my own parser on every platform is not solution for me.

Theoretical solution: Build your app on cross platform Qt 5 framework. Design your views in QML designer and use it in your app. It should be rendered correctly on all platforms. You can also get/update your QML from your server anytime keeping your UI up to date.

OTHER TIPS

Its Possible,

Client side Needs

  1. Need to create a framework app which will get a xml from server.(All Platform)
  2. Parse the xml and identify the tag and create the dynamic UI
  3. Ex: <TextArea name="textField1" value="My World" size="0,0,30,50">
  4. Display the UI in activity/Window

(Note) We can create a Dynamic UI in Android,IOS.

Server side needs

  1. Drag and drop UI creation tool for creating xml.

  2. Need to create a common xml which client app should understand.

  3. Create a web service to Deliver the xml to client.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top