How do I implement Delphi XE6 mobile alternate fmx forms

  

I’m writing a mobile application using Delphi XE6 and found in one of the examples in their repository the ability to have a Master view and alternate fmx views for different devices. The sample looked as it if would select the correct form based on compiler directives, but I cannot seem to get that to work. The interface looks great as I can have the Master form with the basic content, then implement inherited changes based on screen size and capabilities. There are icons when in this view such as Add View and Remove View. When selecting Add View, the dialog of all Android and iOS devices comes up allowing selection, then when selected it shows the additional views with an icon of the device background such as iPhone5. The unit then shows the multiple references like this:

implementation

uses Math;

{$R *.fmx}

{$R *.iPhone5.fmx IOS}

{$R *.Samsung_Galaxy_S4.fmx ANDROID}

The alternate views then show inherited properties from the Master form allowing you to alter values and include specific styles that match the platform. If this worked it would save so much effort. I’m currently having trouble with the TStyleBook as the iOSBlack style is not compatible with the Android and throws an error on the device. When using the AndroidDark style there is a similar issue on the iOS device. Has anyone had experience with this multiple view mode?

Thanks!

Comments are closed.