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();
}
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();
}
Aggregations