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

For Android: fixed position of Menu and vertically centered labels #1

Merged
merged 1 commit into from
Nov 2, 2017

Conversation

kcbar
Copy link
Contributor

@kcbar kcbar commented Nov 1, 2017

This fixes two UI issues on Android:

  1. The menu was opening in the top left corner of the screen, regardless of where the menu button was placed. This was caused by the view being collapsed: https://facebook.github.io/react-native/docs/view.html#collapsable. Setting collapsable to false fixed the issue.
  2. The MenuItem titles were at the bottom of their containers, not vertically centered. This was caused by the lineHeight CSS property which behaves differently on iOS vs Android. (See issue here: Lineheight behaves differently on ios and android facebook/react-native#10712). I removed this property and set justifyContent on the container instead.

React native versions:
react-native-cli: 2.0.1
react-native: 0.49.1

Before:
screenshot_1509557325

After:
screenshot_1509557376

@mxck mxck merged commit 9c6756d into mxck:master Nov 2, 2017
@mxck
Copy link
Owner

mxck commented Nov 2, 2017

@kcbar thanks! 👍

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