The card view type enables you to display content and actions for a single element using a format that is similar to card components in Material Design. You choose a layout and configure the content blocks.
The following provides an example of the Nearby card view from the Facility Inspections template.
Use a card view in your app as described in the following sections:
- Get started with an app template
- Create a card view
- Configure the card view options
- Configure the layout
See also Views: The Essentials for more information about managing views.
Get started with an app template
Many of the app templates demonstrate how to use the card view, such as the following templates:
Create a card view
To create a card view:
- Create a view, as described in Create a view.
- Configure the card view, as follows:
- Select card as the View type when configuring the card view details, as described in View details.
- Configure the card view options.
- Configure the Display, Behavior, and Documentation settings, as described in Configure the view.
- When you are done, save your changes by selecting one of the following:
- Save - Save the app.
- Save & verify data - Save the app and verify that it is runnable based on external dependencies.
Configure the card view options
Configure the card View options by using the settings described in the following table.
Setting |
Description |
Sort by |
Sort the rows by one or more columns. Click Add and select the column name and whether to sort in Ascending or Descending order. Repeat to configure additional sort by rules. |
Group by |
Group rows by the values in one or more columns. Click Add and select the column name and whether to sort in Ascending or Descending order. Repeat to configure additional sort by rules. |
Group aggregate |
Display a numeric summary of the rows in each group. Select the format to use for the display from the drop-down list. |
Layout |
Configure the layout for the card view. |
Configure the layout
Configure the layout of the card view as described in the following sections.
Choose a layout
When creating and configuring your card view, you need to choose the layout that you want to use to display the content. Card views support the following layouts.
Backdrop
Large
List
Photo
Configure the content blocks
Based on the layout that you choose there are a number of content blocks available that you can configure. The following figure highlights the full set of content blocks available when you choose the large layout.
The following table summarizes the content blocks that are available in each layout.
Configure the content blocks available for your layout as described in the following sections:
- Configure text blocks including title, subtitle, header, subheader, and description
- Configure image blocks including main image and thumbnail
- Configure action blocks including text, icon, or menu item
Configure text blocks
Text blocks in a card view layout include title, subtitle, header, subheader, and description.
To configure a text block:
- In the Layout structure, click the text block that you want to configure, such as Title goes here.
- Select a column in the Column to show drop-down list that will be used to populate the text block. To hide the text block, select None.
For example, the following shows the steps to configure the card view title in a list layout. In this case, the Inspection Point ID is used to populate the title block.
Configure image blocks
Image blocks in a card view layout include the main and thumbnail images.
To configure an image block:
- In the Layout structure, click the image block that you want to configure.
- Select a column in the Column to show drop-down list that will be used to populate the image block. To hide an image block, select None and skip any remaining steps.
-
If available, select one of the following Image Fit options to configure the image display:
-
Cover - Uses the image as a background for the whole view (great for pattern images and some photos)
-
Fit - Scale the image to fit inside the header area (great for logos)
-
Fill - Crop the image to fit the area (great for photos)
-
-
If available, select the Image Shape, square or round.
For example, the following shows the steps to configure the card view thumbnail image in a list layout. In this case, the Point Image is used to populate the image block.
Configure action blocks
Configure action blocks that are displayed as text, icon, or menu items.
To configure an action block:
- In the Layout structure, click the text, icon, or menu item action block that you want to configure.
- Select the action that you want to execute when the text, icon, or menu item is selected in the On Click drop-down. The drop-down includes includes actions defined for the selected table, Go to details, and None. To display details for an item in a detail view. select Go to details. To hide an action block, select None.
For example, the following shows the steps to configure an icon action block in a large layout. In this case, the Inspect action is invoked when the checkmark icon is clicked.