[android] Adds delay to inset application on API 29 and lower

Signed-off-by: hemanggs <hemangmanhas@gmail.com>
This commit is contained in:
hemanggs
2025-06-18 17:48:59 +05:30
committed by Konstantin Pastbin
parent bdcee82a13
commit 7b600efd5c

View File

@@ -482,7 +482,10 @@ public class MapButtonsController extends Fragment
.build();
ViewCompat.setOnApplyWindowInsetsListener(mFrame, insetsListener);
// Fixes insets on older Androids and with a search opened via API on all Androids.
mFrame.post(() -> ViewCompat.requestApplyInsets(mFrame));
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.Q)
mFrame.postDelayed(() -> ViewCompat.requestApplyInsets(mFrame), 1250);
else
mFrame.post(() -> ViewCompat.requestApplyInsets(mFrame));
}
@Override