BottomSheetDialog 消失后不显示

2017-03-23  本文已影响315人  一洼世界

原文

View  bottomSheetView = getLayoutInflater().inflate(R.layout.bottomsheetdialog_layout, null);

BottomSheetDialog  bottomSheetDialog = new BottomSheetDialog(MainActivity.this);

bottomSheetDialog.setContentView(bottomSheetView);

BottomSheetBehavior  bottomSheetBehavior = BottomSheetBehavior.from((View) bottomSheetView.getParent());

bottomSheetDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {

            @Override

            public void onDismiss(DialogInterface dialog) {

                bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);

                textPrompt1.setText("OnDismiss");

            }

        });
上一篇 下一篇

猜你喜欢

热点阅读