美文网首页
BottomSheetDialog 消失后不显示

BottomSheetDialog 消失后不显示

作者: 一洼世界 | 来源:发表于2017-03-23 10:29 被阅读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");

            }

        });

相关文章

网友评论

      本文标题: BottomSheetDialog 消失后不显示

      本文链接:https://www.haomeiwen.com/subject/zprznttx.html