Repository navigation
fix(android): enable edge-to-edge for translucent modal Dialogs - #96
Merged
paufau merged 1 commit intoOct 15, 2026
Merged
Conversation
Owner
|
Thank you very much for raising the pull request! I'm going to free up some time tomorrow to review it and merge asap |
Owner
|
Hey @huukhuong, could you please provide more info |
Contributor
Author
|
Hi @paufau, here’s all the information you need:
<View style={[styles.safeArea, { backgroundColor: colors.background }]}>
<ScrollView
style={styles.scroll}
contentContainerStyle={[
styles.scrollContent,
{ paddingBottom: height / 2 },
]}
>
<Typography testID="screen-top" style={styles.architecture}>
Current Architecture: {IS_FABRIC ? "Fabric 🚀" : "Paper ✈️"}
</Typography>
<View style={styles.casesContainer}>
{demoCases.map(({ title, description, id }) => (
<ScenarioCard
key={id}
testID={`${id}-open-button`}
title={title}
description={description}
onPress={() => {
openModal(id);
}}
/>
))}
</View>
</ScrollView>
{activeCases.map(renderModal)}
</View>; |
Owner
|
Hey, thanks for waiting and for your contribution. During testing, I was able to reproduce the bug on versions 14 and below; everything worked fine for me on version 16. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
On Android, modal Dialogs did not draw truly edge-to-edge: the backdrop stopped at the status / navigation bars instead of extending behind them. That breaks the documented edge-to-edge behavior (
statusBar.translucent+ backdrop covering system bars while JS pads content with safe area).This change enables edge-to-edge for the modal window so the backdrop can cover both the status bar and the navigation bar.
Changes
WindowCompat.setDecorFitsSystemWindows(window, false)Theme.FullScreenDialog)SafeAreaView/ insets)Screenshots
Full Screen modal
Status / nav bars stay opaque or letterboxed before; after apply, the modal backdrop extends behind both system bars.
Simple modal
Notes / migration
statusBar={{ translucent: true }}(or deprecatedstatusBarTranslucent) should pad content withSafeAreaView/useSafeAreaInsets, same as the edge-to-edge guide.Test plan
SOFT_INPUT_ADJUST_RESIZE)statusBar.translucent: falsestill respects system insets