use of com.example.stackmasterdetailfrag.application.IsMasterView in project simple-stack by Zhuinden.
the class SinglePaneRoot method handleStateChange.
@Override
public void handleStateChange(StateChange stateChange, Callback completionCallback) {
singlePaneFragmentStateChanger.handleStateChange(stateChange);
FragmentManager fragmentManager = FragmentManagerService.get(getContext());
Fragment fragment = fragmentManager.findFragmentById(R.id.fragment_container);
if (fragment != null && fragment.getView() != null && fragment.getView() instanceof IsMasterView) {
((IsMasterView) fragment.getView()).updateSelection(stateChange.<MasterDetailPath>topNewState());
}
completionCallback.stateChangeComplete();
}
use of com.example.stackmasterdetailfrag.application.IsMasterView in project simple-stack by Zhuinden.
the class TabletMasterDetailRoot method handleStateChange.
@Override
public void handleStateChange(final StateChange stateChange, StateChanger.Callback callback) {
masterDetailFragmentStateChanger.handleStateChange(stateChange);
FragmentManager fragmentManager = FragmentManagerService.get(getContext());
Fragment fragment = fragmentManager.findFragmentById(R.id.master);
if (fragment != null && fragment.getView() != null && fragment.getView() instanceof IsMasterView) {
((IsMasterView) fragment.getView()).updateSelection(stateChange.<MasterDetailPath>topNewState());
}
callback.stateChangeComplete();
}
Aggregations