Houcin
Houcin

Reputation: 31

Flex Air Android : Disable back button

In some modern devices, the back button on Android is pure software. The classical method to disable the back button don't work for me Disable back button

Is there any other solution (the manifest or else) to disable the back button on Android ?

Thanks guys.

Upvotes: 1

Views: 190

Answers (1)

Koby Douek
Koby Douek

Reputation: 16675

Add this to your View or Application's properties and script:

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    ....
    ....
    backKeyPressed="view1_backKeyPressedHandler(event)">


    // Add this to your <fx:Script> area:
    protected function view1_backKeyPressedHandler(event:FlexEvent):void
    {
        event.preventDefault();
        event.stopImmediatePropagation();
    }

Upvotes: 1

Related Questions