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

BREAKING: Android: Correct value of Dimensions.get('screen').fontScale #11008

Closed

Commits on Feb 13, 2017

  1. Android: Add UIManager.getContentSizeMultiplier

    This gives apps the ability to find out the current scaling factor for fonts on the device.
    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    f27182f View commit details
    Browse the repository at this point in the history
  2. Revert "Android: Add UIManager.getContentSizeMultiplier"

    This reverts commit 29c8093.
    
    Instead of exposing new getContentSizeMultiplier method, expose this information on Dimensions.get('screen').fontScale.
    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    2f896a7 View commit details
    Browse the repository at this point in the history
  3. Correctly export fontScale to JS

    Here's a summary of the changes in this commit:
      - Breaking change: UIManager was exporting DisplayMetrics.scaledDensity under the name fontScale. However, scaledDensity is actually density * fontScale. We now correctly export just fontScale under the name fontScale.
      - The didUpdateDimensions event now fires when fontScale changes.
    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    0f5ea42 View commit details
    Browse the repository at this point in the history
  4. Begin fixing buck errors

    - Removed some unnecessary imports to fix some buck errors.
    - Added a missing dependency to a BUCK file. Unfortunately, it introduced a dependency cycle. I'm not sure how to break it yet.
    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    340f7ca View commit details
    Browse the repository at this point in the history
  5. Don't set mFontScale in emitUpdateDimensionsEvent

    emitUpdateDimensionsEvent shouldn't have side effects. Instead, set it in onHostResume.
    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    3ce2b47 View commit details
    Browse the repository at this point in the history
  6. Share construction of the dimensions object

    The same helper function, getDimensionsConstants, is now used both when constructing the UIManager's initial constants object and when firing the didUpdateDimensions event.
    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    e8fc329 View commit details
    Browse the repository at this point in the history
  7. Add 'change' event for subscribing to Dimensions updates with a cross…

    … platform interface
    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    55a9467 View commit details
    Browse the repository at this point in the history
  8. Tweak formatting

    Adam Comella committed Feb 13, 2017
    Configuration menu
    Copy the full SHA
    f5c2fff View commit details
    Browse the repository at this point in the history