It seems when the user click the “BackButton” on a view that the “ToolbarPressed” event does not fire.
Is this a bug or by design?
Is there some way to get the “ToolbarPressed” to fire in this case?
Thanks
It seems when the user click the “BackButton” on a view that the “ToolbarPressed” event does not fire.
Is this a bug or by design?
Is there some way to get the “ToolbarPressed” to fire in this case?
Thanks
The BackButton is kind of an automatic thing. It’s a property of the previous view which is kind of screwy. When it’s pressed it’s automatically takes you back to the previous view.
So I think this is by design and I don’t know if you can override it or not. I know the other Toolbar Pressed events work.
[quote=156304:@James Meyer]It seems when the user click the “BackButton” on a view that the “ToolbarPressed” event does not fire.
Is this a bug or by design?
Is there some way to get the “ToolbarPressed” to fire in this case?
[/quote]
You may think of “back” as exactly the same function as the browser “back” button. It works just the same, and takes you back to the view you came back from.
If you are not using tab navigation, though, you could use the view deactivate event to detect when back has been pressed, If you also use another mean of navigation such as buttons, you may want to use flags to distinguish between the ways deactivate was fired.
You can even modify navigation, by pushing another view in there. I just tested going from view1 to view2, and in view2.deactivate, pushto View3.
It is a bit awkward, because you see the shuffle between views, but it works.
Thanks guys…
The view’s close event does fire and as Michel suggests I can set a flag to distinguish if it was triggered via the back button or something else.