Reflect native modality, avoid adjusting view size when opening the keyboard (Android)

I am using a react-native modal that contains a View.
View has some TextInput elements. When the keyboard pops up, the View elements are all collapsed to fit the remaining space, but I don’t want the View Completely changed.

This will not happen to IOS. Moreover, it will not happen in a non-modal Android view in the same application.

I set windowSoftInputMode=”adjustPan” in my android Manifest, but it doesn’t seem to be applied on Modal.

return( 
style={{flex: 1}} imageStyle={{resizeMode:'cover'}}>

(...)
presentationStyle={'fullScreen'}
onRequestClose={() => this.closeModal()}>

style={ {flex: 1}} imageStyle={{resizeMode:'cover'}}>




(...)

flexDirection:'row'}}>
onChangeText={(myTitle) => this.setState({ myTitle}))
placeholder='Title'
/>

< div class="answer"> As a workaround, I ended up using Modal’s subview instead of the fixed height value of flex. (Used size height to get). It seems to work as I expected.

I’m using a reactive native modal that contains a View.
View has some TextInput elements. When the keyboard pops up, the View elements are all collapsed to fit the remaining space, but I don’t want the View to change completely.

< /p>

This will not happen in IOS. Moreover, it will not happen in the non-modal Android view in the same application.

I set it in my android Manifest windowSoftInputMode = “adjustPan”, but it doesn’t seem to be applied on Modal.

return( 
style={{flex: 1}} imageStyle={{resizeMode:'cover'}}>

(...)
presentationStyle={'f ullScreen'}
onRequestClose={() => this.closeModal()}>

style={{flex: 1}} imageStyle={{resizeMode:'cover'}}>




(...)

flexDirection:'row'}}>
onChangeText={(myTitle) => this.setState({myTitle })}
placeholder='Title'
/>

As a solution, I ended up using Modal’s subview instead of flex’s fixed height value. (Used size height to get). It seems to work as I expected.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3606 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.