11import { AppActivityIndicator } from "./AppActivityIndicator" ;
22import { Column , Row , Text as NativeText , RNHostView } from "@expo/ui/jetpack-compose" ;
33import { weight } from "@expo/ui/jetpack-compose/modifiers" ;
4- import { useState , type ReactNode } from "react" ;
4+ import { use , useState , type ReactNode } from "react" ;
55import { View } from "react-native" ;
66
77import type { AppSymbolName } from "./AppSymbol" ;
@@ -12,6 +12,7 @@ import { splitAndroidHeaderActions } from "./headerMenu.android";
1212import { useScaledTextRole } from "../../features/settings/appearance/useScaledTextRole" ;
1313import { useToolbarLayout } from "./useToolbarLayout" ;
1414import { useControlTheme } from "./useControlTheme" ;
15+ import { RoutedFormSheetContext } from "./RoutedFormSheetContext" ;
1516
1617export interface AndroidHeaderAction {
1718 readonly accessibilityLabel : string ;
@@ -50,7 +51,8 @@ export function AndroidScreenHeader(props: {
5051 const { colors } = useControlTheme ( ) ;
5152 const titleTypography = useScaledTextRole ( "title" ) ;
5253 const subtitleTypography = useScaledTextRole ( "label" ) ;
53- const { paddingTop, paddingBottom } = useToolbarLayout ( props . embedded ) ;
54+ const inFormSheet = use ( RoutedFormSheetContext ) ;
55+ const { paddingTop, paddingBottom } = useToolbarLayout ( props . embedded || inFormSheet ) ;
5456 const [ headerWidth , setHeaderWidth ] = useState ( 0 ) ;
5557 const { visibleActions, overflowActions } = splitAndroidHeaderActions (
5658 props . actions ?? [ ] ,
@@ -67,6 +69,12 @@ export function AndroidScreenHeader(props: {
6769 borderBottomWidth : props . hideBottomBorder ? 0 : undefined ,
6870 } }
6971 >
72+ { inFormSheet ? (
73+ < View
74+ pointerEvents = "none"
75+ className = "absolute top-1 h-1 w-8 self-center rounded-full bg-header-foreground/40"
76+ />
77+ ) : null }
7078 < NativeAppBar
7179 singleLine = { props . compact }
7280 navigationIcon = {
0 commit comments