You are here: Designing an Application > Forking

Forking

Forking allows you to customize properties uniquely for a platform. You can fork:

Forking a Form

Forking forms enables you to customize the position and availability of widgets on different platforms.

You fork a form to accomplish the following:

Important Considerations

How to Fork a Form

Forking allows you to customize a form specific to a platform. For example, you can fork a form to appear on an iOS (native) platform with green background and have the same form forked to appear on an Android (web) platform with yellow background.

To fork a form, do the following:

  1. In the Project Explorer, on the Project tab, expand the channel with the form you want to fork, either Mobile, Tablet, or Desktop.
  2. Expand Forms, click the context menu arrow of the form you want to fork, and then click Fork.The Fork Platforms dialog box displays.

  3. Select the platforms for which you want to create a fork, and then click OK.

    The form is forked for the platforms you selected, which is reflected on the Project tab.

Fork a Widget Property

Forking allows you to provide different values for the same property or skin, across the platforms. You can fork the flex layout and fork all the look properties associated with the flex container.

Only certain widget properties can be forked. You can identify whether a property can be forked by the presence of an icon( ) to the left of the property's name. Two types of forking are available for you:

  1. Simple Forking: Allows you to fork one platform at a time.
  2. Complex Forking: Allows you to fork multiple platforms at the same time.

Simple Forking

This example illustrates how to do a simple forking, which forks just one platform at a time. In it, the View Type property of a Calendar widget is forked, but the same principle is applicable for all simple forking of widget properties.

To fork an individual property for a particular platform, do the following:

  1. On the Visualizer Canvas, select the widget whose property you want to fork.
  2. Select the desired platform from the Platform list—for example, Android : Native.
  3. In the Properties Editor, on either the Look tab or the properties tab for the specific widget (which, since our example is a Calendar widget, the properties tab is the Calendar tab), configure the value of the property you want to fork. In this example, we'll select Popup Grid from the View Type drop-down list.
  4. Click the fork icon located to the left of the property you changed, The icon changes to , indicating that the value is forked specifically for the platform you chose, which in this example is the Android : Native platform.
  5. When you navigate to a different platform, the value of the forked property is replaced either with:

Complex Forking

This example illustrates how to do a complex forking, which forks multiple platforms at the same time. In it, the View Type property of a Calendar widget is forked, but the same principle is applicable for all complex forking of widget properties.

Properties for which complex forking is possible have an ellipsis button located at the far right of the property.

In this section, using the View Type property of a Calendar widget, let us understand complex forking. The below steps, however, can be used for forking any of the widget properties.

To fork an individual property for multiple platforms, do the following:

  1. On the Visualizer Canvas, select the widget whose property you want to fork.
  2. In the Properties Editor, on either the Look tab or the properties tab for the specific widget (which, since our example is a Calendar widget, the properties tab is the Calendar tab), configure the value of the property you want to fork. In this example, we'll select Popup Grid from the View Type drop-down list.
  3. Click the ellipsis button to the right of the property you want to fork for multiple platforms.
  4. In the dialog box that opens, click the platforms for which you want to fork the property, and then for each platform, select the property value you want. Click OK.
  5. The icon changes to , indicating that the value is forked specifically for the platforms you chose.

Copyright © 2013 Kony, Inc. All rights reserved.