BottomSheetDialog中CardView圆角不显示及去除白边

注意两个地方

CardView 需要设置android:layout_marginTop="@dimen/y70"才会显示

去除白边:

 dialog.setContentView(view);
            dialog.getDelegate().findViewById(android.support.design.R.id.design_bottom_sheet)
                    .setBackgroundColor(context.getResources().getColor(android.R.color.transparent));
发布了46 篇原创文章 · 获赞 62 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/qq_27512671/article/details/89374936