我的 Android 项目中有以下代码:
final BottomSheetBehavior infoBottomSheetBehavior = BottomSheetBehavior.from(findViewById(R.id.info_view));
infoBottomSheetBehavior.addBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
@Override
public void onStateChanged(@NonNull View bottomSheet, int newState) {
if (newState == BottomSheetBehavior.STATE_DRAGGING) {
infoBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}
}
@Override
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
}
});
下一个警告出现在 BottomSheetBehavior:Raw use of parameterized class 'BottomSheetBehavior'
有谁知道如何避免这个警告?