react-native-navigation的迁移库

options-layout.mdx 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ---
  2. id: options-layout
  3. title: Layout Options
  4. sidebar_label: Layout
  5. ---
  6. ```js
  7. const options = {
  8. layout: {}
  9. };
  10. ```
  11. ### `fitSystemWindows`
  12. | Type | Required | Platform |
  13. | ------- | -------- | -------- |
  14. | boolean | No | Both |
  15. ### `backgroundColor`
  16. Set the screen background color.
  17. | Type | Required | Platform |
  18. | ----- | -------- | -------- |
  19. | Color | No | Both |
  20. ### `componentBackgroundColor`
  21. Set background color only for components, helps reduce overdraw if background color is set in default options.
  22. | Type | Required | Platform |
  23. | ----- | -------- | -------- |
  24. | Color | No | Android |
  25. ### `orientation`
  26. Set the allowed orientations.
  27. | Type | Required | Platform |
  28. | ------------------------- | -------- | -------- |
  29. | ['portrait', 'landscape'] | No | Both |
  30. ### `topMargin`
  31. Set the layout top margin.
  32. | Type | Required | Platform |
  33. | ------ | -------- | -------- |
  34. | number | No | Android |
  35. ### `direction`
  36. Set language direction, only works with DefaultOptions.
  37. | Type | Required | Platform |
  38. | ------------------ | -------- | -------- |
  39. | enum('rtl', 'ltr') | No | Both |