Search in sources :

Example 1 with OptionsMenuControl

use of com.waz.zclient.pages.main.participants.OptionsMenuControl in project wire-android by wireapp.

the class PendingConnectRequestManagerFragment method onCreateView.

//////////////////////////////////////////////////////////////////////////////////////////
//
//  Lifecycle
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_connect_request_pending_manager, container, false);
    optionsMenuControl = new OptionsMenuControl();
    if (savedInstanceState == null) {
        String userId = getArguments().getString(ARGUMENT_USER_ID);
        String conversationId = getArguments().getString(ARGUMENT_CONVERSATION_ID);
        ConnectRequestLoadMode loademode = ConnectRequestLoadMode.valueOf(getArguments().getString(ARGUMENT_LOAD_MODE));
        userRequester = IConnectStore.UserRequester.valueOf(getArguments().getString(ARGUMENT_USER_REQUESTER));
        getChildFragmentManager().beginTransaction().add(R.id.fl__pending_connect_request, PendingConnectRequestFragment.newInstance(userId, conversationId, loademode, userRequester), PendingConnectRequestFragment.TAG).commit();
        getChildFragmentManager().beginTransaction().add(R.id.fl__pending_connect_request__settings_box, OptionsMenuFragment.newInstance(false), OptionsMenuFragment.TAG).commit();
    }
    return view;
}
Also used : OptionsMenuControl(com.waz.zclient.pages.main.participants.OptionsMenuControl) View(android.view.View)

Example 2 with OptionsMenuControl

use of com.waz.zclient.pages.main.participants.OptionsMenuControl in project wire-android by wireapp.

the class ConversationListManagerFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_conversation_list_manager, container, false);
    mainContainer = ViewUtils.getView(view, R.id.fl__conversation_list_main);
    startuiLoadingIndicatorView = ViewUtils.getView(view, R.id.liv__conversations__loading_indicator);
    listLoadingIndicatorView = ViewUtils.getView(view, R.id.lbv__conversation_list__loading_indicator);
    startuiLoadingIndicatorView.setColor(getResources().getColor(R.color.people_picker__loading__color));
    listLoadingIndicatorView.setColor(getControllerFactory().getAccentColorController().getColor());
    confirmationMenu = ViewUtils.getView(view, R.id.cm__confirm_action_light);
    confirmationMenu.setVisibility(View.GONE);
    confirmationMenu.resetFullScreenPadding();
    optionsMenuControl = new OptionsMenuControl();
    if (savedInstanceState == null) {
        // When re-starting app to open into specific page, child fragments may exist despite savedInstanceState == null
        if (getControllerFactory().getPickUserController().isShowingUserProfile()) {
            getControllerFactory().getPickUserController().hideUserProfile();
        }
        if (getControllerFactory().getPickUserController().isShowingPickUser(IPickUserController.Destination.CONVERSATION_LIST)) {
            getControllerFactory().getPickUserController().hidePickUser(IPickUserController.Destination.CONVERSATION_LIST, false);
            Fragment pickUserFragment = getChildFragmentManager().findFragmentByTag(PickUserFragment.TAG);
            if (pickUserFragment != null) {
                getChildFragmentManager().popBackStack(PickUserFragment.TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
            }
        }
        getChildFragmentManager().beginTransaction().add(R.id.fl__conversation_list_main, ConversationListFragment.newInstance(ConversationListFragment.Mode.NORMAL), ConversationListFragment.TAG).add(R.id.fl__conversation_list__settings_box, OptionsMenuFragment.newInstance(true), OptionsMenuFragment.TAG).commit();
    }
    return view;
}
Also used : OptionsMenuControl(com.waz.zclient.pages.main.participants.OptionsMenuControl) View(android.view.View) LoadingIndicatorView(com.waz.zclient.views.LoadingIndicatorView) 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)

Aggregations

View (android.view.View)2 OptionsMenuControl (com.waz.zclient.pages.main.participants.OptionsMenuControl)2 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 LoadingIndicatorView (com.waz.zclient.views.LoadingIndicatorView)1