user5993761
user5993761

Reputation:

Smartface adding buttons that navigate to another page in the app

I tried adding buttons that redrict to certain pages however every time I change one button it changes all the other buttons as to where the page would navigate. This is what happens... what the script editor shows what happens to other buttons when I change just one button

Upvotes: 1

Views: 125

Answers (2)

Luccas Clezar
Luccas Clezar

Reputation: 1074

The show() method needs some parameters to work. You could try something like this:
Pages.Page2.show(4, 2, 1, false, false);

If you want to check on these parameters, go to Smartface API (http://docs.smartface.io/) and find the Page section (SMF.UI.Page), from there, find the show() method and you will see a list of it's parameters.

Hope that helps :)


Edit

Full tutorial:

  1. Create a Text Button and name it whatever you want (the button name doesn't need to be the same as the label inside it). Image 1
  2. Go to the script editor and choose the "OnPressed" event of the created button in the upper bar (it'll be the button name). Image 2
  3. It'll create a code in the editor automatically, now just add the Pages.[putThePageNameHere].show(4, 2, 1, false, false); inside this automatically-generated function and thats it. Image 3


Image 1 1]


Image2 2]


Image 3 3]



Again, hope that helps :)

Upvotes: 1

Manthan Shah
Manthan Shah

Reputation: 77

You should add Pages.Page2.show(); just this '{}' this brackets are not required.

Upvotes: 0

Related Questions