Android: Issue when displayed in Modal
See original GitHub issueThere is an issue with the keyboard/height adjustments when displaying the component in a Modal
.
It can be reproduced with the following simple render code:
<Image source={{ uri: 'http://cdn.pcwallart.com/images/dark-gradient-tumblr-wallpaper-1.jpg'}} style={{ flex: 1 }}>
<GiftedChat />
</Image>
This renders the following:
When focusing the TextInput, the component correctly resizes and positiones the input bar:
However when the code above is wrapped in a <Modal> .. </Modal>
the following happens when focusing the TextInput:
There are no issues on iOS.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Bootstrap Modal not displaying correctly on Android Webview
I'm currently using Titanium SDK to use a webview that displays my remote website. The website has a twitter-bootstrap modal/popup on it.
Read more >Problem with modal window on Android mobile - DataTables
Click on 'click to show deal'. The popup window on Android shows way down the screen and is not scaled to the width...
Read more >Dialogs - Android Developers
AlertDialog: A dialog that can show a title, up to three buttons, a list of selectable items, or a custom layout.
Read more >Modal DIALOG does not interact well with Android 4.4 KitKat ...
This is an omnibus bug report rolling up a few issues. We want to track an end-to-end modal dialog scenario. Plus the issues...
Read more >The Dialog element - HTML: HyperText Markup Language
When the open attribute is not set, the dialog shouldn't be shown to the user. It is recommended to use the .show() or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, digging through the react-native code I see that
Modal
on Android is implemented asDialog
.The issue is that
adjustResize
isn’t being applied to theDialog
that displays the modal. This can be fixed by adding the following tores/values/styles.xml
:Might be worth adding to the README 😃
Thank you, I will add in readme