Search in sources :

Example 1 with EntryMenuController

use of com.nextcloud.talk.controllers.bottomsheet.EntryMenuController 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)

Example 2 with EntryMenuController

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

the class ContactsController method prepareAndShowBottomSheetWithBundle.

private void prepareAndShowBottomSheetWithBundle(Bundle bundle) {
    if (view == null) {
        view = getActivity().getLayoutInflater().inflate(R.layout.bottom_sheet, null, false);
    }
    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.setOnCancelListener(dialog -> {
        if (getActionBar() != null) {
            getActionBar().setDisplayHomeAsUpEnabled(true);
        }
    });
    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)

Aggregations

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