Search in sources :

Example 1 with Page

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);
}
Also used : PickUserFragment(com.waz.zclient.pages.main.pickuser.PickUserFragment) Page(com.waz.zclient.controllers.navigation.Page) BlockedUserProfileFragment(com.waz.zclient.pages.main.connect.BlockedUserProfileFragment) Fragment(android.support.v4.app.Fragment) FirstTimeAssignUsernameFragment(com.waz.zclient.newreg.fragments.FirstTimeAssignUsernameFragment) ParticipantsDialogFragment(com.waz.zclient.pages.main.participants.dialog.ParticipantsDialogFragment) OptionsMenuFragment(com.waz.zclient.pages.main.participants.OptionsMenuFragment) PendingConnectRequestManagerFragment(com.waz.zclient.pages.main.connect.PendingConnectRequestManagerFragment) SendConnectRequestFragment(com.waz.zclient.pages.main.connect.SendConnectRequestFragment) CameraFragment(com.waz.zclient.pages.main.profile.camera.CameraFragment) PickUserFragment(com.waz.zclient.pages.main.pickuser.PickUserFragment) BaseFragment(com.waz.zclient.pages.BaseFragment)

Example 2 with Page

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);
}
Also used : Page(com.waz.zclient.controllers.navigation.Page)

Example 3 with Page

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);
}
Also used : Page(com.waz.zclient.controllers.navigation.Page)

Aggregations

Page (com.waz.zclient.controllers.navigation.Page)3 Fragment (android.support.v4.app.Fragment)1 FirstTimeAssignUsernameFragment (com.waz.zclient.newreg.fragments.FirstTimeAssignUsernameFragment)1 BaseFragment (com.waz.zclient.pages.BaseFragment)1 BlockedUserProfileFragment (com.waz.zclient.pages.main.connect.BlockedUserProfileFragment)1 PendingConnectRequestManagerFragment (com.waz.zclient.pages.main.connect.PendingConnectRequestManagerFragment)1 SendConnectRequestFragment (com.waz.zclient.pages.main.connect.SendConnectRequestFragment)1 OptionsMenuFragment (com.waz.zclient.pages.main.participants.OptionsMenuFragment)1 ParticipantsDialogFragment (com.waz.zclient.pages.main.participants.dialog.ParticipantsDialogFragment)1 PickUserFragment (com.waz.zclient.pages.main.pickuser.PickUserFragment)1 CameraFragment (com.waz.zclient.pages.main.profile.camera.CameraFragment)1