@@ -82,7 +82,12 @@ export type ChannelInputProps = {
82
82
} ;
83
83
84
84
const 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
+ } ) ;
86
91
87
92
// FIXME(iOS): Dynamic style does not work properly when typing the CJK. (https://github.com/facebook/react-native/issues/26107)
88
93
// To workaround temporarily, change the key for re-mount the component.
@@ -96,6 +101,15 @@ const ChannelInput = (props: ChannelInputProps) => {
96
101
const { channel, keyboardAvoidOffset, messageToEdit, setMessageToEdit } = props ;
97
102
98
103
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 ;
99
113
const { colors, typography } = useUIKitTheme ( ) ;
100
114
const { sbOptions, mentionManager } = useSendbirdChat ( ) ;
101
115
@@ -138,10 +152,7 @@ const ChannelInput = (props: ChannelInputProps) => {
138
152
139
153
return (
140
154
< >
141
- < KeyboardAvoidingView
142
- keyboardVerticalOffset = { - safeArea . paddingBottom + keyboardAvoidOffset }
143
- behavior = { KEYBOARD_AVOID_VIEW_BEHAVIOR }
144
- >
155
+ < KeyboardAvoidingView keyboardVerticalOffset = { keyboardVerticalOffset } behavior = { KEYBOARD_AVOID_VIEW_BEHAVIOR } >
145
156
< View
146
157
style = { {
147
158
paddingStart : safeArea . paddingStart ,
@@ -181,7 +192,7 @@ const ChannelInput = (props: ChannelInputProps) => {
181
192
/>
182
193
) }
183
194
</ View >
184
- < SafeAreaBottom height = { safeArea . paddingBottom } />
195
+ { ! isAndroidApi35 && < SafeAreaBottom height = { safeArea . paddingBottom } /> }
185
196
</ View >
186
197
</ KeyboardAvoidingView >
187
198
{ mentionAvailable && props . SuggestedMentionList && (
0 commit comments