use of com.waz.zclient.pages.main.pickuser.PickUserFragment 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.pages.main.pickuser.PickUserFragment 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;
}
use of com.waz.zclient.pages.main.pickuser.PickUserFragment in project wire-android by wireapp.
the class ParticipantFragment method onBackPressed.
//////////////////////////////////////////////////////////////////////////////////////////
//
// OnBackPressedListener
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public boolean onBackPressed() {
PickUserFragment pickUserFragment = (PickUserFragment) getChildFragmentManager().findFragmentByTag(PickUserFragment.TAG);
if (pickUserFragment != null && pickUserFragment.onBackPressed()) {
return true;
}
SingleOtrClientFragment singleOtrClientFragment = (SingleOtrClientFragment) getChildFragmentManager().findFragmentByTag(SingleOtrClientFragment.TAG);
if (singleOtrClientFragment != null) {
getControllerFactory().getConversationScreenController().hideOtrClient();
return true;
}
SingleParticipantFragment singleUserFragment = (SingleParticipantFragment) getChildFragmentManager().findFragmentByTag(SingleParticipantFragment.TAG);
if (singleUserFragment != null && singleUserFragment.onBackPressed()) {
return true;
}
if (closeMenu()) {
return true;
}
if (getControllerFactory().getPickUserController().isShowingPickUser(getCurrentPickerDestination())) {
getControllerFactory().getPickUserController().hidePickUser(getCurrentPickerDestination(), true);
return true;
}
if (getControllerFactory().getConversationScreenController().isShowingUser()) {
getControllerFactory().getConversationScreenController().hideUser();
return true;
}
if (getControllerFactory().getConversationScreenController().isShowingParticipant()) {
getControllerFactory().getConversationScreenController().hideParticipants(true, false);
return true;
}
return false;
}
Aggregations