12-06-2018 13:01
12-06-2018 13:01
I can generate a list from the tutorial given in https://dev.fitbit.com/build/guides/user-interface/svg-components/views/#advanced-usage.
But on OnClick, how do I show another page with some text in it?
12-13-2018 08:34
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
12-13-2018 08:34
You basically need to show and hide <svg> elements, like:
<svg id="list"> <!-- your tile list --> </svg>
<svg id="details" display="none">
<text id="thing" />
<text id="back" pointer-events="all">Back</text>
</svg>
let list = document.getElementById("list");
let details = document.getElementById("details");
let thing = document.getElementById("thing");
let back = document.getElementById("back");
function backClickHandler() {
details.style.display = "none";
list.style.display = "inline";
}
function itemClickHandler() {
list.style.display = "none";
thing.text = "something";
details.style.display = "inline";
}
Best Answer