use of com.waz.zclient.controllers.navigation.Page in project wire-android by wireapp.
the class ConversationListManagerFragment method onShowPickUser.
//////////////////////////////////////////////////////////////////////////////////////////
//
// PickUserControllerScreenObserver
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public void onShowPickUser(IPickUserController.Destination destination, View anchorView) {
if (!getCurrentPickerDestination().equals(destination)) {
onHidePickUser(getCurrentPickerDestination(), true);
return;
}
Page page = getControllerFactory().getNavigationController().getCurrentLeftPage();
switch(page) {
// TODO: START is set as left page on tablet, fix
case START:
case CONVERSATION_LIST:
Fragment fragment = getChildFragmentManager().findFragmentByTag(PickUserFragment.TAG);
if (fragment == null || !(fragment instanceof PickUserFragment)) {
getControllerFactory().getOnboardingController().incrementPeoplePickerShowCount();
PickUserFragment pickUserFragment = PickUserFragment.newInstance(false);
getChildFragmentManager().beginTransaction().setCustomAnimations(R.anim.slide_in_from_bottom_pick_user, R.anim.open_new_conversation__thread_list_out, R.anim.open_new_conversation__thread_list_in, R.anim.slide_out_to_bottom_pick_user).replace(R.id.fl__conversation_list_main, pickUserFragment, PickUserFragment.TAG).addToBackStack(PickUserFragment.TAG).commit();
}
break;
case PICK_USER:
break;
}
getControllerFactory().getNavigationController().setLeftPage(Page.PICK_USER, TAG);
}
use of com.waz.zclient.controllers.navigation.Page in project wire-android by wireapp.
the class ParticipantFragment method onHideUser.
@Override
public void onHideUser() {
if (!getControllerFactory().getConversationScreenController().isShowingUser()) {
return;
}
getChildFragmentManager().popBackStackImmediate();
if (LayoutSpec.isPhone(getActivity())) {
Page rightPage = getControllerFactory().getConversationScreenController().isShowingParticipant() ? Page.PARTICIPANT : Page.MESSAGE_STREAM;
getControllerFactory().getNavigationController().setRightPage(rightPage, TAG);
}
animateParticipantsWithConnectUserProfile(true);
}
use of com.waz.zclient.controllers.navigation.Page in project wire-android by wireapp.
the class ConversationListManagerFragment method onHidePickUser.
@Override
public void onHidePickUser(IPickUserController.Destination destination, boolean closeWithoutSelectingPeople) {
if (!destination.equals(getCurrentPickerDestination())) {
return;
}
Page page = getControllerFactory().getNavigationController().getCurrentLeftPage();
switch(page) {
case SEND_CONNECT_REQUEST:
case BLOCK_USER:
case PENDING_CONNECT_REQUEST:
getControllerFactory().getPickUserController().hideUserProfile();
case PICK_USER:
ConversationListFragment conversationListFragment = (ConversationListFragment) getChildFragmentManager().findFragmentByTag(ConversationListFragment.TAG);
if (conversationListFragment != null) {
conversationListFragment.setScrollToConversation(!closeWithoutSelectingPeople);
}
getChildFragmentManager().popBackStackImmediate(PickUserFragment.TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
KeyboardUtils.hideKeyboard(getActivity());
break;
}
getControllerFactory().getNavigationController().setLeftPage(Page.CONVERSATION_LIST, TAG);
getControllerFactory().getFocusController().setFocus(IFocusController.CONVERSATION_CURSOR);
}
Aggregations