Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

留白问题处理 #69

Open
jfycd opened this issue Mar 11, 2020 · 0 comments
Open

留白问题处理 #69

jfycd opened this issue Mar 11, 2020 · 0 comments

Comments

@jfycd
Copy link

jfycd commented Mar 11, 2020

主要是hauwei vivo oppo高版本会出这样的问题
重写dialog的show方法即可
@OverRide
public void show() {
super.show();
String brand = Build.BRAND;
if (!TextUtils.isEmpty(brand) && (brand.toLowerCase().contains("huawei") || brand.toLowerCase().contains("vivo")
|| brand.toLowerCase().contains("oppo"))) {
Window window = getWindow();
window.getDecorView().setPadding(0, 0, 0, 0);
LayoutParams layoutParams = window.getAttributes();
layoutParams.width = LayoutParams.MATCH_PARENT;
layoutParams.height = LayoutParams.MATCH_PARENT;
window.setAttributes(layoutParams);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant