因为R.id.design_bottom_sheet 是来自于 com.google.android.material 包的 BottomSheetDialog 的内部资源 ID,使用
com.google.android.material.R.id.design_bottom_sheet
mBottomSheetDialog = new BottomSheetDialog(this,R.style.BottomSheetDialogStyle);
dialogBottomView = getLayoutInflater().inflate(R.layout.dialog_bottom, null);
mBottomSheetDialog.setContentView(dialogBottomView);
//必须在setContentView下面
mBottomSheetDialog.getWindow().findViewById(com.google.android.material.R.id.design_bottom_sheet).setBackgroundColor(Color.TRANSPARENT);