mirror of
https://github.com/Tencent/QMUI_Android.git
synced 2026-10-29 11:37:07 +08:00
update: move method invocation of insets.hasSystemWindowInsets(), it will be useful sometime when you override method
This commit is contained in:
@@ -51,7 +51,7 @@ public class QMUIWindowInsetLayout extends FrameLayout {
|
||||
}
|
||||
|
||||
private WindowInsetsCompat setWindowInsets(WindowInsetsCompat insets) {
|
||||
if (Build.VERSION.SDK_INT >= 21 && insets.hasSystemWindowInsets()) {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
if (applySystemWindowInsets21(insets)) {
|
||||
return insets.consumeSystemWindowInsets();
|
||||
}
|
||||
@@ -98,7 +98,10 @@ public class QMUIWindowInsetLayout extends FrameLayout {
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
private boolean applySystemWindowInsets21(WindowInsetsCompat insets) {
|
||||
protected boolean applySystemWindowInsets21(WindowInsetsCompat insets) {
|
||||
if(!insets.hasSystemWindowInsets()){
|
||||
return false;
|
||||
}
|
||||
boolean consumed = false;
|
||||
boolean showKeyboard = false;
|
||||
if (insets.getSystemWindowInsetBottom() >= KEYBOARD_HEIGHT_BOUNDARY) {
|
||||
|
||||
Reference in New Issue
Block a user