Reputation: 11
I'm setting the icon as an attribute of answers that belong to a question with type 5, and I can't visualize these icons in my movelet.
<question key="SCOOTER_DETAILS" type="5">
<answer attributeType="9" key="SCOOTER_DETAILS_TITLE" nextQuestionKey="END" position="0">
<text>%SCOOTER_DETAILS_TITLE%</text>
</answer>
<answer icon="44" attributeType="-128" key="SCOOTER_DETAILS_IMEI" nextQuestionKey="END" position="1">
<text>%SCOOTER_DETAILS_IMEI%</text>
<predefinedValue/>
</answer>
<answer icon="39" attributeType="-128" key="SCOOTER_DETAILS_SOC" nextQuestionKey="END" position="2">
<text>%SCOOTER_DETAILS_SOC%</text>
<predefinedValue/>
</answer>
<answer icon="2" attributeType="-128" key="SCOOTER_DETAILS_BATTEMP" nextQuestionKey="END" position="3">
<text>%SCOOTER_DETAILS_BATTEMP%</text>
<predefinedValue/>
</answer>
<answer icon="3" attributeType="-128" key="SCOOTER_DETAILS_ODOMETER" nextQuestionKey="END" position="4">
<text>%SCOOTER_DETAILS_ODOMETER%</text>
<predefinedValue/>
</answer>
<answer icon="8" attributeType="-128" key="SCOOTER_DETAILS_LAST_CHARGED" nextQuestionKey="END" position="5">
<text>%SCOOTER_DETAILS_LAST_CHARGED%</text>
<predefinedValue/>
</answer>
<answer icon="12" attributeType="-128" key="SCOOTER_DETAILS_CURRENT_LOCATION" nextQuestionKey="END" position="6">
<text>%SCOOTER_DETAILS_CURRENT_LOCATION%</text>
<predefinedValue/>
</answer>
<answer icon="42" attributeType="-128" key="SCOOTER_DETAILS_DRIVER_NAME" nextQuestionKey="END" position="7">
<text>%SCOOTER_DETAILS_DRIVER_NAME%</text>
<predefinedValue/>
</answer>
</question>
This thing is working for question type 6.
I would appreciate if someone could help me find a solution to this problem. Thanks.
Upvotes: 1
Views: 94
Reputation: 106
While you are able to display icons in a menu screen (type="6"), you aren't allowed to define icons in a text item screen (type="5"), with exception of the attributeType="12" answers. Those are especially designed for displaying a label and an icon. Furthermore you can define the icon dynamically with the setAnswerIconByClientKey($answer:"key", ck, iconID); method.
Just a hint for the layout. You can adjust the ratio of the label and the icon space by the use of the columnSizeType="" attribute. As long as the icon only claims a few pixels in width, you should set it to "RIGHT", to have more space for the label. Possible values are LEFT, RIGHT, EQUAL and ROWS and this setting is also valid for all other attributeTypes.
Best regards, Andreas
Upvotes: 2