Hey.
I have a view i wish to update every time a user press an "up"/"down" button.
On the simulator it works as expected but in the device every time i press one of the buttons it shows all my view (i have three) but stays on my first view every time.
Here is my code:
function nextPage()
{
Toybox.System.println("nextPage()");
viewNum = (viewNum + 1) % 3;
Ui.requestUpdate();
return true;
}
//! Update the page index for the previous page and request a UI update.
function previousPage()
{
Toybox.System.println("previousPage()");
viewNum--;
if (viewNum < 0) {
viewNum = 2;
}
Ui.requestUpdate();
return true;
}
function onNextPage()
{
Toybox.System.println(" onNextPage() ");
return relatedView.nextPage();
}
function onPreviousPage()
{
Toybox.System.println(" onPreviousPage()");
return relatedView.previousPage();
}
Thank you in advance