横屏下 BottomPopupView 的 isCenterHorizontal 不生效
Opened this issue · 1 comments
sgpublic commented
XPopup版本
如2.9.19
手机系统和型号
红米 K20 Pro Android 11
描述你的问题
横屏状态下,对于设置了宽度的 BottomPopupView
,isCenterHorizontal(true)
不生效,dialog 显示在左侧。
new XPopup.Builder(getContext())
.isDestroyOnDismiss(true)
.popupWidth(/* 400dp */)
.popupPosition(PopupPosition.Bottom)
.isCenterHorizontal(true)
.asCustom(new TestBottomDialog(getContext()))
.show(); // 显示在左侧
public class TestBottomDialog extends BottomPopupView {
...
private final Lazy<DialogViewBinding> ViewBinding = LazyKt.lazy(() ->
DialogViewBinding.bind(getPopupImplView()));
private DialogViewBinding ViewBinding() {
return ViewBinding.getValue();
}
@Override
protected int getImplLayoutId() {
return R.layout.dialog_view;
}
...
}
另外,这种方式 borderRadius()
也不生效,请问是不支持吗,谢谢!
junixapp commented
borderRadius只对内置弹窗生效,自定义的无效