this.page = page;
this.navigator = navigator;
- page.addListener(this);
+ page.addFragmentChangedListener(this);
}
@Override
listeners.add(listener);
}
- /**
- * @deprecated Since 7.0, replaced by
- * {@link #addViewChangeListener(ViewChangeListener)}
- **/
- @Deprecated
- public void addListener(ViewChangeListener listener) {
- addViewChangeListener(listener);
- }
-
/**
* Remove a view change listener.
*
public void removeViewChangeListener(ViewChangeListener listener) {
listeners.remove(listener);
}
-
- /**
- * @deprecated Since 7.0, replaced by
- * {@link #removeViewChangeListener(ViewChangeListener)}
- **/
- @Deprecated
- public void removeListener(ViewChangeListener listener) {
- removeViewChangeListener(listener);
- }
-
}
// test navigator
navigator.addProvider(provider);
- navigator.addListener(listener);
+ navigator.addViewChangeListener(listener);
navigator.navigateTo("test1");
navigator.navigateTo("test2");
// test navigator
navigator.addProvider(provider);
- navigator.addListener(listener1);
- navigator.addListener(listener2);
+ navigator.addViewChangeListener(listener1);
+ navigator.addViewChangeListener(listener2);
navigator.navigateTo("test1");
navigator.navigateTo("test1/test");