Open fangkeweiyou1 opened 6 years ago
Having same issue with full screen gestures.
it is my solution :
int topCutoutHeight = 0;
//Solve problems caused Android P,you can check issuses #4
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
topCutoutHeight = getTopCutoutHeight() /*+ UiUtils.getStatusBarHeight(activity)*/;
}
//Solve problems caused MIUI
if(RomUtil.isMiui()){ //check is MIUI
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
// Whether hide navigationbar,if hide:add navigationbar height
if(Settings.Global.getInt(activity.getContentResolver(), "force_fsg_nav_bar", 0) != 0) {
topCutoutHeight = topCutoutHeight + UiUtils.getNavigationBarHeight(activity);
}
}
}
int keyboardHeight = screenSize.y + topCutoutHeight - rect.bottom ;
Having the same issue, I think it's related to the top notch, and swipe navigation