Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix orientation change bugs #425

Merged
merged 4 commits into from
Apr 16, 2017
Merged

Conversation

cooperka
Copy link
Collaborator

@cooperka cooperka commented Apr 14, 2017

This combines the fix from PR #280 (rebased because of merge conflicts, and @psrustik has been unresponsive) with a fix for issue #413.

Brief summary of issues fixed:

  1. On current master, iOS screen turns blank after an orientation change, and Android jumps all over the place if the keyboard is shown before rotation
  2. After the fix for orientation changes, composer height gets reset and send button goes off-screen during orientation changes (both iOS and Android)
  3. Lots of duplicated math, I cleaned it up and put it into helper methods

Please see individual commits to get a better sense of the changes. Each commit is very simple on its own, though the full PR diff might be confusing to view all at once.

Tested thoroughly on iOS and Android; please also verify yourself if you can :) Basically just type some long text and rotate the phone / dismiss the keyboard / etc. to try to break it.

rustik and others added 4 commits April 13, 2017 16:10
Turned on onLayout handler for all platforms.

Android only: on-screen keyboard resized main container and has own height.
https://developer.android.com/training/keyboard-input/visibility.html
So for calculate the messages container height need ignore keyboard height.
By using the same formula for messagesContainerHeight
in onMainViewLayout as everywhere else.
@kfiroo
Copy link
Collaborator

kfiroo commented Apr 16, 2017

@cooperka Sweet! Thanks! :)

@kfiroo kfiroo merged commit c0cbd25 into FaridSafi:master Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants