View 3
description_view
The dataset chores
contains 2 columns with data. So far we’ve only displayed 1 column, the name. Let’s display the description in a separate view.
Go to Views again and click New to create the third view
for this example. Name the view description_view
, this time select type View and click Create.
In the Views Properties tab, set View Layout Mode to Free Positioning so we can place components where we want them.
Rich Text Display
-
The Rich Text Display displays formatted text
-
Click the Add Component tab.
-
Find the Text Display group.
-
Click Rich Text, and a new component is added to the canvas.
-
Move it to the middle of the canvas and resize it to your liking
Input
-
The Text Input lets the user input text.
-
Under the View Properties tab, scroll down to Inputs and click New Input.
-
Give the input the same name as the dataset column it should display,in this case
description
. -
Select type Text and click Add.
-
Select the rich text display on the canvas, and open the Component Properties tab.
-
Under Data, write ${description} in the field Text. This instructs the rich text display to get it’s content from the input called
description
.
-
Back-navigation
The last thing we will do is to add events so when we click the description in the Rich Text component, we navigate back to the second_view
or the welcome_view
.
Go to Views again and select description_view
.
Long click
-
Select the View Properties tab.
-
Find Outputs and click New Output.
-
Name the output
richTextLongClick
and select type Event. -
Click Add.
-
Now, select the rich text component on the canvas.
-
Select the Component Properties tab.
-
Find On Long Press and select
richTextLongClick
in the drop down list.