Commit db95bdbb authored by Yacumima's avatar Yacumima

just request apply insets

parent fd39ca34
...@@ -193,19 +193,20 @@ public class BoostFlutterView extends FlutterView { ...@@ -193,19 +193,20 @@ public class BoostFlutterView extends FlutterView {
protected void onAttachedToWindow() { protected void onAttachedToWindow() {
//Debuger.log("flutterView onAttachedToWindow"); //Debuger.log("flutterView onAttachedToWindow");
super.onAttachedToWindow(); super.onAttachedToWindow();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
final WindowInsets windowInsets = getRootWindowInsets(); // final WindowInsets windowInsets = getRootWindowInsets();
if(windowInsets != null) { // if(windowInsets != null) {
if(mCurrentWindowInsets == null || // if(mCurrentWindowInsets == null ||
!TextUtils.equals(windowInsets.toString(),mCurrentWindowInsets.toString())) { // !TextUtils.equals(windowInsets.toString(),mCurrentWindowInsets.toString())) {
Debuger.log("setWindowInsets "+windowInsets.toString()); // Debuger.log("setWindowInsets "+windowInsets.toString());
//
mCurrentWindowInsets = windowInsets; // mCurrentWindowInsets = windowInsets;
super.onApplyWindowInsets(mCurrentWindowInsets); // super.onApplyWindowInsets(mCurrentWindowInsets);
} // }
} // }
}else { // }else {
ViewCompat.requestApplyInsets(this); // ViewCompat.requestApplyInsets(this);
} // }
ViewCompat.requestApplyInsets(this);
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment