fix(mobile): fix keyboard hiding text input on Android and iOS
- Set android.softwareKeyboardLayoutMode to "pan" in app.json to prevent conflict between system adjustResize and KeyboardAvoidingView - Use behavior="padding" consistently on both platforms - Add keyboardVerticalOffset on Android to account for nav header - Applied fix across all screens with keyboard input Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fa5fcc9e91
commit
fe90d5b4e7
|
|
@ -30,7 +30,8 @@
|
|||
"foregroundImage": "./assets/adaptive-icon.png",
|
||||
"backgroundColor": "#0d1117"
|
||||
},
|
||||
"package": "com.composio.aomobile"
|
||||
"package": "com.composio.aomobile",
|
||||
"softwareKeyboardLayoutMode": "pan"
|
||||
},
|
||||
"web": {
|
||||
"favicon": "./assets/favicon.png"
|
||||
|
|
|
|||
|
|
@ -164,8 +164,8 @@ export default function SessionDetailScreen({ route, navigation }: Props) {
|
|||
return (
|
||||
<KeyboardAvoidingView
|
||||
style={styles.root}
|
||||
behavior={Platform.OS === "ios" ? "padding" : "height"}
|
||||
keyboardVerticalOffset={Platform.OS === "ios" ? 88 : 0}
|
||||
behavior="padding"
|
||||
keyboardVerticalOffset={Platform.OS === "ios" ? 88 : 80}
|
||||
>
|
||||
<ScrollView ref={scrollRef} style={styles.container} contentContainerStyle={styles.content} keyboardShouldPersistTaps="handled">
|
||||
{/* Header row */}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,8 @@ export default function SettingsScreen({ navigation }: Props) {
|
|||
return (
|
||||
<KeyboardAvoidingView
|
||||
style={styles.root}
|
||||
behavior={Platform.OS === "ios" ? "padding" : undefined}
|
||||
behavior="padding"
|
||||
keyboardVerticalOffset={Platform.OS === "ios" ? 88 : 80}
|
||||
>
|
||||
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
|
||||
<View style={styles.section}>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ export default function SpawnSessionScreen({ navigation }: Props) {
|
|||
return (
|
||||
<KeyboardAvoidingView
|
||||
style={styles.root}
|
||||
behavior={Platform.OS === "ios" ? "padding" : undefined}
|
||||
behavior="padding"
|
||||
keyboardVerticalOffset={Platform.OS === "ios" ? 88 : 80}
|
||||
>
|
||||
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
|
||||
<View style={styles.section}>
|
||||
|
|
|
|||
Loading…
Reference in New Issue