BehaviorDelegate.onPreviousPage() vs onBack()

Former Member
Former Member
This might be a lack of caffeine in my system this morning, but I was struggling to get my widget app to listen to the Lap/Back button. I assumed from the API docs that I wanted to use onBack(), but it was never getting called.

Eventually I guessed onPreviousPage() and that works fine. Perhaps the API docs could be expanded a little to say under which circumstances pressing Lap/Back would call onBack() and when it would call onPreviousPage() ?

Thanks
  • The onNextPage/onPreviousPage behaviors are for handling going to the next/previous in a page carousel . The onBack behavior is for going back on the page stack. You might say "But Mister Monkey! Obviously you would just go use the up down buttons to deal with the carousel!" And then the sage old* Monkey would flip his Fu Manchu beard and say, "BUT... what about products WITHOUT up and down buttons!" And there would be gasps from the other students.**

    -Alpha Monkey

    * Well, maybe not old old.
    ** Yes, this is how it plays out in my head. It's a weird place to live.