Skip to content

留白问题处理 #69

Description

@jfycd

主要是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);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions