Commit db95bdbb authored by Yacumima's avatar Yacumima

just request apply insets

parent fd39ca34
......@@ -193,19 +193,20 @@ public class BoostFlutterView extends FlutterView {
protected void onAttachedToWindow() {
//Debuger.log("flutterView onAttachedToWindow");
super.onAttachedToWindow();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
final WindowInsets windowInsets = getRootWindowInsets();
if(windowInsets != null) {
if(mCurrentWindowInsets == null ||
!TextUtils.equals(windowInsets.toString(),mCurrentWindowInsets.toString())) {
Debuger.log("setWindowInsets "+windowInsets.toString());
mCurrentWindowInsets = windowInsets;
super.onApplyWindowInsets(mCurrentWindowInsets);
}
}
}else {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
// final WindowInsets windowInsets = getRootWindowInsets();
// if(windowInsets != null) {
// if(mCurrentWindowInsets == null ||
// !TextUtils.equals(windowInsets.toString(),mCurrentWindowInsets.toString())) {
// Debuger.log("setWindowInsets "+windowInsets.toString());
//
// mCurrentWindowInsets = windowInsets;
// super.onApplyWindowInsets(mCurrentWindowInsets);
// }
// }
// }else {
// 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