Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunhat authored Feb 25, 2019
1 parent a199cc3 commit 6048ecb
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,21 @@ Or, if you are using ES6
### API
There is only one method `get(dimension: string)` that takes in a dimension name, and returns its value as a `number`.
`ExtraDimensions.get(dimension: string)` that takes in a dimension name, and returns its value as a `number`.
Supported dimensions are:
- `REAL_WINDOW_HEIGHT` - Actual height of screen including system decor elements
- `REAL_WINDOW_WIDTH` - Actual width of screen including system decor elements
- `STATUS_BAR_HEIGHT` - Height of the status bar
- `REAL_WINDOW_HEIGHT` - Actual height of screen including system decor elements
- `REAL_WINDOW_WIDTH` - Actual width of screen including system decor elements
- `STATUS_BAR_HEIGHT` - Height of the status bar
- `SOFT_MENU_BAR_HEIGHT` - Height of the soft menu bar (supported on most new Android devices)
- `SMART_BAR_HEIGHT` - Height of the MeiZu's device smart bar
- `SMART_BAR_HEIGHT` - Height of the MeiZu's device smart bar
Alternatively, there are methods for each constant, to fulfill autocomplete in your IDE
`ExtraDimensions.getRealWidthHeight()`
`ExtraDimensions.getRealWindowWidth()`
`ExtraDimensions.getStatusBarHeight()`
`ExtraDimensions.getSoftMenuBarHeight()`
`ExtraDimensions.getSmartBarHeight()`
`ExtraDimensions.isSoftMenuBarEnabled()`

0 comments on commit 6048ecb

Please sign in to comment.