3

Is there any way to prevent the default back button behavior in the navigation bar of a navigationview?

I'm trying to use Sencha Touch 2 history and linking abilities with routers, but that requires me to essentially intercept all button taps so that I can update the url.

The back button in a navigation bar creates all kinds of nightmares as far as thats concerned, and I can supply code if someone thinks they have an alternate solution, but preventing the default back button behavior seems best (so as to play nice with browser back button)

4

2 回答 2

4

如果您想处理后退按钮,您可以使用在导航视图的后退按钮被点击时触发back event的哪个按钮。有关如何操作,请参阅我之前的回答。navigation view

如果您想完全隐藏后退按钮,只需使用:

Ext.select('.x-button-back').hide();
于 2012-10-20T03:29:33.430 回答
0

试试这个 Ext.getCmp('navigationview's id').getNavigatorBar().hide()

于 2012-11-01T06:00:52.260 回答