dialog 没有居中或者显示不全(小米手机)
解决办法
Window window =dialog.getWindow();
// window.setGravity(Gravity.CENTER);
WindowManager.LayoutParams layoutParams = window.getAttributes();
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
window.setAttributes(layoutParams);
参考:https://article.itxueyuan.com/O0P9M
https://dandelioncloud.cn/article/details/1503805753193492481