Question

Im creating an app (rather big one) with Worklight. When im testing the app in an android phone and press the backbutton it closes the app.. now i want it to go back one page. Right now the page navigation is with dojox mobile implemented system. this way:

<button data-dojo-type="dojox.mobile.ToolBarButton" data-dojo-props="transition:'fade',dir:'1',moveTo:'Contact'" class="buttonHem" style="color:black; font-size:1em;">Kontakta Oss</button>

is there a way to use the android backbutton without having to redo everything?

we have deadline in 2 weeks so there is really no time to redo the app with jquery mobile..

Answers will be appreciated.

Was it helpful?

Solution

If you're talking about a hardware Android back button you have a WL API to override it's behaviour. WL.App.overrideBackButton(function() { doSomething }); and WL.App.resetBackButton();

OTHER TIPS

The back button functionality should work in Dojo Mobile. Looking at the documentation for ToolBarButton I think what you need to do is use a # in front of your next view for the moveTo attribute. In your example it would be moveTo:'#Contact' Take a look at the moveTo attribute in the doc below for more info.

http://dojotoolkit.org/reference-guide/1.8/dojox/mobile/ToolBarButton.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top