Search in sources :

Example 1 with CallMenuController

use of com.nextcloud.talk.controllers.bottomsheet.CallMenuController in project talk-android by nextcloud.

the class CallsListController method prepareAndShowBottomSheetWithBundle.

private void prepareAndShowBottomSheetWithBundle(Bundle bundle, boolean shouldShowCallMenuController) {
    if (view == null) {
        view = getActivity().getLayoutInflater().inflate(R.layout.bottom_sheet, null, false);
    }
    if (shouldShowCallMenuController) {
        getChildRouter((ViewGroup) view).setRoot(RouterTransaction.with(new CallMenuController(bundle)).popChangeHandler(new VerticalChangeHandler()).pushChangeHandler(new VerticalChangeHandler()));
    } else {
        getChildRouter((ViewGroup) view).setRoot(RouterTransaction.with(new EntryMenuController(bundle)).popChangeHandler(new VerticalChangeHandler()).pushChangeHandler(new VerticalChangeHandler()));
    }
    if (bottomSheet == null) {
        bottomSheet = new BottomSheet.Builder(getActivity()).setView(view).create();
    }
    bottomSheet.setOnShowListener(dialog -> new KeyboardUtils(getActivity(), bottomSheet.getLayout()));
    bottomSheet.show();
}
Also used : ViewGroup(android.view.ViewGroup) KeyboardUtils(com.nextcloud.talk.utils.KeyboardUtils) VerticalChangeHandler(com.bluelinelabs.conductor.changehandler.VerticalChangeHandler) BottomSheet(com.kennyc.bottomsheet.BottomSheet) EntryMenuController(com.nextcloud.talk.controllers.bottomsheet.EntryMenuController) CallMenuController(com.nextcloud.talk.controllers.bottomsheet.CallMenuController)

Aggregations

ViewGroup (android.view.ViewGroup)1 VerticalChangeHandler (com.bluelinelabs.conductor.changehandler.VerticalChangeHandler)1 BottomSheet (com.kennyc.bottomsheet.BottomSheet)1 CallMenuController (com.nextcloud.talk.controllers.bottomsheet.CallMenuController)1 EntryMenuController (com.nextcloud.talk.controllers.bottomsheet.EntryMenuController)1 KeyboardUtils (com.nextcloud.talk.utils.KeyboardUtils)1