感谢! 在 2021-02-26 11:28:39,"cuvette0205" notifications@github.com 写道: 我也遇到了这种问题,我的是非dialog模式下底部虚拟键和弹框重合了,我的解决方法是使用dialog模式,显示到底部,然后把布局的Margin值改为0,代码大致是这样的: TimePickerView build = new TimePickerBuilder(context, listener) .setType(booleans) .setTitleText(title) .isDialog(true) .setDate(currentDate) .setRangDate(startDate, endDate) .build(); FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) build.getDialogContainerLayout().getLayoutParams(); lp.leftMargin = 0; lp.rightMargin = 0; build.getDialog().getWindow().setGravity(Gravity.BOTTOM); build.getDialog().getWindow().setWindowAnimations(R.style.picker_view_slide_anim); build.show(); — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
2条答案
按热度按时间yjghlzjz1#
我也遇到了这种问题,我的是非dialog模式下底部虚拟键和弹框重合了,我的解决方法是使用dialog模式,显示到底部,然后把布局的Margin值改为0,代码大致是这样的:
TimePickerView build = new TimePickerBuilder(context, listener)
.setType(booleans)
.setTitleText(title)
.isDialog(true)
.setDate(currentDate)
.setRangDate(startDate, endDate)
.build();
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) build.getDialogContainerLayout().getLayoutParams();
lp.leftMargin = 0;
lp.rightMargin = 0;
build.getDialog().getWindow().setGravity(Gravity.BOTTOM);
build.getDialog().getWindow().setWindowAnimations(R.style.picker_view_slide_anim);
build.show();
8gsdolmq2#
感谢! 在 2021-02-26 11:28:39,"cuvette0205" notifications@github.com 写道: 我也遇到了这种问题,我的是非dialog模式下底部虚拟键和弹框重合了,我的解决方法是使用dialog模式,显示到底部,然后把布局的Margin值改为0,代码大致是这样的: TimePickerView build = new TimePickerBuilder(context, listener) .setType(booleans) .setTitleText(title) .isDialog(true) .setDate(currentDate) .setRangDate(startDate, endDate) .build(); FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) build.getDialogContainerLayout().getLayoutParams(); lp.leftMargin = 0; lp.rightMargin = 0; build.getDialog().getWindow().setGravity(Gravity.BOTTOM); build.getDialog().getWindow().setWindowAnimations(R.style.picker_view_slide_anim); build.show(); — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.