2
에 내가 BottomSheetDialogFragment.Everything 완벽 일하고 있어요,하지만 난 하나의 문제 야 내 BottomSheetDialogFragment.This에 PeekHeight를 변경할 수있는 것은 내 소스변경 PeekHeight이 BottomSheetDialogFragment
public class BottomSheet3DialogFragment extends BottomSheetDialogFragment {
private BottomSheetBehavior mBottomSheetBehavior2;
private BottomSheetBehavior.BottomSheetCallback
mBottomSheetBehaviorCallback = new BottomSheetBehavior.BottomSheetCallback() {
@Override
public void onStateChanged(@NonNull View bottomSheet, int newState) {
if (newState == BottomSheetBehavior.STATE_HIDDEN) {
dismiss();
}
mBottomSheetBehavior2= BottomSheetBehavior.from(bottomSheet);
if(mBottomSheetBehavior2!=null)
mBottomSheetBehavior2.setPeekHeight(20);
}
@Override
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
}
};
@Override
public void setupDialog(final Dialog dialog, int style) {
super.setupDialog(dialog, style);
View contentView = View.inflate(getContext(), R.layout.fragment_bottomsheet3, null);
dialog.setContentView(contentView);
}
}
mButton3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BottomSheet3DialogFragment bottomSheetDialogFragment = new BottomSheet3DialogFragment();
bottomSheetDialogFragment.show(getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
});
입니다
내 조각에서 PeekHeight를 변경할 수 있습니까? 사람이 솔루션은 나에게 감사 dialog.setContentView(contentView);
후