6
4

2 回答 2

1

if for some reason you still have to use old support library, here is the workaround for this.

mBottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
        @Override
        public void onStateChanged(@NonNull final View bottomSheet, int newState) {
            bottomSheet.post(new Runnable() {
                @Override
                public void run() {
                    //workaround for the bottomsheet  bug
                    bottomSheet.requestLayout();
                    bottomSheet.invalidate();
                }
            });
        }

        @Override
        public void onSlide(@NonNull View bottomSheet, float slideOffset) {
        }
    });
于 2016-10-26T16:10:10.063 回答
0

After switching to design library 24.0.0, the issue cannot be reproduced anymore.

Thanks for the efforts from the Android team to make our life easier and easier.

于 2016-06-27T19:01:48.747 回答