BottomSheetBehavior not in androidX libraries

后端 未结 3 1010
渐次进展
渐次进展 2020-12-23 11:03

I was using the BottomSheetBehavior with the original support library:

implementation \'com.android.support:design:27.1.1\' 

W

3条回答
  •  伪装坚强ぢ
    2020-12-23 11:43

    It turns out that the refactor tool in Android Studio Refactor > Migrate to AndroidX didn't correctly migrate the XML for the BottomSheetBehaviour.

    The old location was android.support.design.widget.BottomSheetBehavior, and was not modified by the migration tool. The original XML was:

    
    

    The new location is com.google.android.material.bottomsheet.BottomSheetBehavior, so the layout needs to become:

    
    

提交回复
热议问题