Ivan Drago
Ivan Drago

Reputation: 105

codename one remove back button on ios

I removed the title of the form because I don't want it. when I did that, a back button on the iOS(On android back button does not show) started to show on the bottom of the form.

enter image description here

I've tried to override showForm() in the StateMachine and invoke setTitle("") but the back button is still there.

@Override 
public Form showForm(String resourceName, Command sourceCommand) {

Form f = super.showForm(resourceName, sourceCommand);
f.setTitle("");

return f;

};

Is there a way to remove that back button?

Upvotes: 3

Views: 674

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

That's not the way. Override allowBackTo as:

protected boolean allowBackTo(String formName) {
    return false;
}

Upvotes: 3

Related Questions