@@ -3,6 +3,7 @@ import type {ForwardedRef} from 'react';
33import React , { useCallback , useEffect , useImperativeHandle , useMemo , useRef , useState } from 'react' ;
44import type { KeyboardTypeOptions , NativeSyntheticEvent } from 'react-native' ;
55import { View } from 'react-native' ;
6+ import useIsInLandscapeMode from '@hooks/useIsInLandscapeMode' ;
67import { useMemoizedLazyExpensifyIcons } from '@hooks/useLazyAsset' ;
78import useLocalize from '@hooks/useLocalize' ;
89import { useMouseActions } from '@hooks/useMouseContext' ;
@@ -186,6 +187,7 @@ function NumberWithSymbolForm({
186187 ...props
187188} : NumberWithSymbolFormProps ) {
188189 const icons = useMemoizedLazyExpensifyIcons ( [ 'DownArrow' , 'PlusMinus' ] ) ;
190+ const isInLandscapeMode = useIsInLandscapeMode ( ) ;
189191
190192 const styles = useThemeStyles ( ) ;
191193 const StyleUtils = useStyleUtils ( ) ;
@@ -571,9 +573,75 @@ function NumberWithSymbolForm({
571573 onFocus = { props . onFocus }
572574 accessibilityLabel = { props . accessibilityLabel }
573575 keyboardType = { props . keyboardType }
576+ shouldAllowFocusInLandscapeMode
574577 />
575578 ) ;
576579
580+ if ( isInLandscapeMode ) {
581+ return (
582+ < >
583+ < ScrollView
584+ contentContainerStyle = { [ styles . flexGrow1 , styles . flexRow ] }
585+ style = { [ styles . flex1 , styles . ph5 ] }
586+ >
587+ < View style = { [ styles . justifyContentCenter , styles . alignItemsCenter , styles . numberWithSymbolFormInputContainerLandscape ] } >
588+ < View style = { [ styles . flexRow , styles . alignItemsCenter , styles . justifyContentCenter ] } > { textInputComponent } </ View >
589+ < View style = { [ styles . flexRow , styles . justifyContentCenter , styles . gap2 ] } >
590+ { isSymbolPressable && (
591+ < Button
592+ shouldShowRightIcon
593+ small
594+ iconRight = { icons . DownArrow }
595+ onPress = { onSymbolButtonPress }
596+ style = { styles . minWidth18 }
597+ isContentCentered
598+ text = { currency }
599+ accessibilityLabel = { `${ translate ( 'common.selectCurrency' ) } , ${ currency } ` }
600+ />
601+ ) }
602+ { allowFlippingAmount && (
603+ < Button
604+ shouldShowRightIcon
605+ small
606+ iconRight = { icons . PlusMinus }
607+ onPress = { toggleNegative }
608+ style = { styles . minWidth18 }
609+ isContentCentered
610+ text = { translate ( 'iou.flip' ) }
611+ accessibilityLabel = { translate ( 'iou.flip' ) }
612+ />
613+ ) }
614+ </ View >
615+ { ! ! errorText && (
616+ < FormHelpMessage
617+ style = { [ styles . ph5 , styles . w100 ] }
618+ isError
619+ message = { errorText }
620+ />
621+ ) }
622+ </ View >
623+
624+ { shouldShowBigNumberPad ? (
625+ < View
626+ style = { [ styles . flex1 , styles . justifyContentCenter ] }
627+ id = { NUM_PAD_CONTAINER_VIEW_ID }
628+ >
629+ { shouldShowBigNumberPad ? (
630+ < BigNumberPad
631+ id = { NUM_PAD_VIEW_ID }
632+ numberPressed = { updateValueNumberPad }
633+ longPressHandlerStateChanged = { updateLongPressHandlerState }
634+ />
635+ ) : null }
636+ </ View >
637+ ) : null }
638+ </ ScrollView >
639+
640+ { ! ! footer && < View style = { [ styles . w100 , styles . justifyContentEnd , styles . pageWrapper , styles . pt0 ] } > { footer } </ View > }
641+ </ >
642+ ) ;
643+ }
644+
577645 return (
578646 < ScrollView
579647 contentContainerStyle = { styles . flexGrow1 }
0 commit comments