Archive for April, 2013

Disabling ‘Back’ button for flex mobile View

// April 14th, 2013 // No Comments » // Hardware

Despite many articles over the network – it is very easy to disable the Back button for any mobile View.
You don’t have to override anything..all you have to do is to define backKeyPressed event in your View declaration and call event.preventDefault() method. Here is an example:

title="My View" backKeyPressed="onBackPRessed(event)" >

And here is the method implementation:

protected function onBackPRessed(event:FlexEvent):void {


This is very useful when you want to disable back button for some view(s). Example you have loged in view which is after the register don’t want your app users to go to register again after they press the back button.. (which is the automaticly popped view)