Skip to main content
LinkedIn
Copied!

Table of Contents

Adaptive and responsive mobile interfaces

Version:

Only available versions of this content are shown in the dropdown
Applicable to Theme Cosmos applications

Adaptive and responsive interfaces help your application successfully reach users through a variety of channels. By using Pega Platform features to build an adaptive and responsive interface, you can ensure that your application displays correctly on any mobile device.

Adaptive interfaces

Adaptive interfaces change how they display UI components in a view depending on the user's device. For example, if your application uses a complex chart that cannot fit on a mobile screen, the system hides the chart to save screen space and prevent a frustrating experience.

Pega Platform offers various out-of-the-box conditions that you can use to build adaptive logic, such as pyIsMobile, which evaluates to true on mobile devices.

In this example, users can see the layout only on mobile devices. You can configure adaptive settings in sections or layouts.

Sample adaptive setting
Layout visibility is set to visible when the app is used on a mobile
                        device.

Responsive interfaces

Responsive interfaces change the visual representation of a view based on the form factor, and do not require any additional conditions. While you set up adaptive interfaces by defining view rendering logic, you configure responsive interface behaviors in the CSS file of your application.

In this example, when the interface reaches a certain breakpoint, for example a minimum screen size, the UI component becomes invisible. You can configure responsive settings in the skin of the application.

Sample responsive setting
Responsive settings are set to cause a UI component to become invisible
                        when a breakpoint is reached.

Best practices

Using design templates and dynamic layouts is a best practice for building adaptive, mobile-ready interfaces. For more information, see Creating views for case types and Creating a dynamic layout.

Configuring an adaptive user interface

Applicable to Theme Cosmos applications

Ensure that your application offers a consistent user experience even on small mobile screens by configuring an adaptive UI. Adaptive interfaces change what they display depending on the user's device.

For example, the interface in a takeout service application might include a large map showing all restaurants in the area. With an adaptive UI, you can choose to hide the map on mobile devices to save screen space and reduce scrolling. The adaptive logic can be applied to both entire views (layouts) and individual UI components, such as controls.
  1. Open the view that you want to edit.

    For more information, see .
  2. Open the settings for the target UI area:

    • To configure a view, in the configuration pane on the right side of the screen, click Settings.
    • To configure a control, in the configuration pane on the right side of the window, hover over the control, and then click the Edit icon.
  3. In the Visibility list, select Condition (when rule).

  4. In the Condition for visibility field, define how the component behaves in a mobile interface:

    • To make the component visible only on mobile interfaces, enter pyIsMobile.
    • To hide the component on mobile interfaces, enter !pyIsMobile.
  5. In the configuration pane, click Apply.

Configuring a responsive user interface

Applicable to Theme Cosmos applications

Improve the clarity and usability of your application on mobile devices by defining how the user interface behaves on smaller screens.

In a responsive layout, how much content is displayed depends on the screen size. For example, you can configure a product image to appear in full size on a desktop computer, but reduce its size for tablets and hide the image completely on mobile phones. This way, you can save screen space and ensure that users with smaller devices do not have to scroll through unnecessary information. To define the screen size range for each interface configuration, you set up responsive breakpoints.

  1. In the header of Dev Studio, click the name of the application, and then click Skin.

  2. On the Component styles tab, on the left side of the Dynamic Layouts header, click the More icon.

  3. In the Layouts list, click the layout that you want to edit.

  4. In the layout pane, in the list of available formats, select the format that you want to edit:

    • To select a custom format, on the My Formats tab, click the target format.
    • To select an inherited format, on the Inherited tab, click the target format.
  5. In the format settings panel, expand the Responsive breakpoints node, and then select the Enable support for responsive breakpoints check box.

  6. If no breakpoints are defined for the layout, click Add breakpoint.

  7. Under the breakpoint header, select the behavior that you want to trigger with the breakpoint:

    The available settings depend on the type of layout.
    • To hide columns with importance that is set to Other, select Drop columns with importance 'other'.
    • To transform the layout to a list, select Transform to list.
    • To hide the layout, select Hide this component.
    • To transform the layout, in the At the settings below switch layout to list, select the alternative layout that you want to use.
    • To transform the layout to another format, select Transform to other format, and then select the format that you want to use.
  8. In the Media type list, select the type of display to which you want to attach the breakpoint.

  9. In the max-width field, define the maximum screen width that triggers the breakpoint behavior.

    For mobile apps, define the trigger width in percent.
  10. Optional:

    To define the minimum screen width that triggers the breakpoint behavior, complete the min-width field.

    For mobile apps, define the trigger width in percent.
  11. Click Save.

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us