Skip to content

Instantly share code, notes, and snippets.

@arunjeetsingh
Created April 15, 2020 16:50
Show Gist options
  • Save arunjeetsingh/44b3d37d2fdfd531a197d8b277a493b3 to your computer and use it in GitHub Desktop.
Save arunjeetsingh/44b3d37d2fdfd531a197d8b277a493b3 to your computer and use it in GitHub Desktop.
{
"commands": {},
"type": "APL",
"version": "1.1",
"theme": "dark",
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"type": "Pager",
"id": "mypager",
"width": "100%",
"height": "100%",
"navigation": "wrap",
"onMount": [
{
"type": "Sequential",
"repeatCount": 1000,
"commands": [
{
"type": "SetPage",
"delay": 5000,
"componentId": "mypager",
"position": "relative",
"value": 1
}
]
}
],
"items": [
{
"type": "Container",
"id": "big-sky-speaker",
"height": "100vh",
"width": "100vw",
"alignItems": "center",
"items": [
{
"type": "Text",
"text": "Page 1"
},
{
"type": "Text",
"bind": {
"name": "T",
"value": "${elapsedTime}"
},
"text": "${Time.format('mm:ss', T)}"
}
]
},
{
"type": "Container",
"id": "big-sky-speaker",
"height": "100vh",
"width": "100vw",
"alignItems": "center",
"items": [
{
"type": "Text",
"text": "Page 2"
},
{
"type": "Text",
"bind": {
"name": "T",
"value": "${elapsedTime}"
},
"text": "${Time.format('mm:ss', T)}"
}
]
},
{
"type": "Container",
"id": "big-sky-speaker",
"height": "100vh",
"width": "100vw",
"alignItems": "center",
"items": [
{
"type": "Text",
"text": "Page 3"
},
{
"type": "Text",
"bind": {
"name": "T",
"value": "${elapsedTime}"
},
"text": "${Time.format('mm:ss', T)}"
}
]
},
{
"type": "Container",
"id": "big-sky-speaker",
"height": "100vh",
"width": "100vw",
"alignItems": "center",
"items": [
{
"type": "Text",
"text": "Page 4"
},
{
"type": "Text",
"bind": {
"name": "T",
"value": "${elapsedTime}"
},
"text": "${Time.format('mm:ss', T)}"
}
]
}
]
}
]
}
}
@arunjeetsingh
Copy link
Author

Note that there is a known issue that will prevent this sample from working correctly in the APL authoring tool (Display button in the Build tab). Echo Show/Spot, Fire TV, and Fire tablet devices are not impacted by this issue. In the authoring tool, a SetPage command with position=relative and value=1 on the final page of a Pager with navigation=wrap makes the Pager goes to the second to last page instead of wrapping around to page 1. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment