resetting state when my page is pop()-ed

Dirk Hohndel dirk at hohndel.org
Sat Feb 6 14:56:39 UTC 2016


We are using the mobile components for an Android application.

One of the features we get by default from the components is that when the
user presses the Android BACK key the top page is pop()-ed from the stack.

Is there a way to get a call back when that happens? So something like

onPagePopped: { resetState() }

(basically, one of our pages keeps state (you can be viewing data or
editing it) and I want the back button to reset that so that it acts more
like a cancel of the edit and gets us back into view mode the next time
this page is opened)

I read through the code and found the popExit() function but that's only
internal to the components. I didn't see anything that would be delivered
to the page.

Thanks

/D


More information about the Plasma-devel mailing list