@@ -82,7 +82,12 @@ export type ChannelInputProps = {
8282} ;
8383
8484const AUTO_FOCUS = Platform . select ( { ios : false , android : true , default : false } ) ;
85- const KEYBOARD_AVOID_VIEW_BEHAVIOR = Platform . select ( { ios : 'padding' as const , default : undefined } ) ;
85+ const isAndroidApi35 = Platform . OS === 'android' && Platform . Version >= 35 ;
86+ const KEYBOARD_AVOID_VIEW_BEHAVIOR = Platform . select ( {
87+ ios : 'padding' as const ,
88+ android : isAndroidApi35 ? ( 'padding' as const ) : undefined ,
89+ default : undefined ,
90+ } ) ;
8691
8792// FIXME(iOS): Dynamic style does not work properly when typing the CJK. (https://github.com/facebook/react-native/issues/26107)
8893// To workaround temporarily, change the key for re-mount the component.
@@ -96,6 +101,15 @@ const ChannelInput = (props: ChannelInputProps) => {
96101 const { channel, keyboardAvoidOffset, messageToEdit, setMessageToEdit } = props ;
97102
98103 const safeArea = useSafeAreaPadding ( [ 'top' , 'left' , 'right' , 'bottom' ] ) ;
104+
105+ // Android API 35+ keyboard avoidance handling
106+ /**
107+ * Android API 35+ introduced edge-to-edge layouts, which changed how keyboard avoidance should be handled.
108+ * For API 35+, the system manages insets automatically, so we use the provided keyboardAvoidOffset directly.
109+ * For older Android versions, we manually subtract the safe area bottom padding to avoid overlapping with system UI.
110+ * See: https://developer.android.com/develop/ui/views/layout/edge-to-edge
111+ */
112+ const keyboardVerticalOffset = isAndroidApi35 ? keyboardAvoidOffset : - safeArea . paddingBottom + keyboardAvoidOffset ;
99113 const { colors, typography } = useUIKitTheme ( ) ;
100114 const { sbOptions, mentionManager } = useSendbirdChat ( ) ;
101115
@@ -138,10 +152,7 @@ const ChannelInput = (props: ChannelInputProps) => {
138152
139153 return (
140154 < >
141- < KeyboardAvoidingView
142- keyboardVerticalOffset = { - safeArea . paddingBottom + keyboardAvoidOffset }
143- behavior = { KEYBOARD_AVOID_VIEW_BEHAVIOR }
144- >
155+ < KeyboardAvoidingView keyboardVerticalOffset = { keyboardVerticalOffset } behavior = { KEYBOARD_AVOID_VIEW_BEHAVIOR } >
145156 < View
146157 style = { {
147158 paddingStart : safeArea . paddingStart ,
@@ -181,7 +192,7 @@ const ChannelInput = (props: ChannelInputProps) => {
181192 />
182193 ) }
183194 </ View >
184- < SafeAreaBottom height = { safeArea . paddingBottom } />
195+ { ! isAndroidApi35 && < SafeAreaBottom height = { safeArea . paddingBottom } /> }
185196 </ View >
186197 </ KeyboardAvoidingView >
187198 { mentionAvailable && props . SuggestedMentionList && (
0 commit comments