Browse Source

layout direction docs (#4810)

Hadi Mostafapour 5 years ago
parent
commit
40d2520094
1 changed files with 21 additions and 0 deletions
  1. 21
    0
      docs/docs/styling.md

+ 21
- 0
docs/docs/styling.md View File

64
     style: 'light' | 'dark'
64
     style: 'light' | 'dark'
65
   },
65
   },
66
   layout: {
66
   layout: {
67
+    direction: 'ltr', // Supported directions are: 'rtl', 'ltr'
67
     backgroundColor: 'white',
68
     backgroundColor: 'white',
68
     orientation: ['portrait', 'landscape'] // An array of supported orientations
69
     orientation: ['portrait', 'landscape'] // An array of supported orientations
69
   },
70
   },
253
 }
254
 }
254
 ```
255
 ```
255
 
256
 
257
+### RTL layout usage
258
+In order to set layout direction to RTL use following options:
259
+```javascript
260
+{
261
+  layout: {
262
+    direction: rtl
263
+  },
264
+  ...
265
+}
266
+```
267
+
268
+also __Android__ requires to set `supportsRTL` in _AndroidManifest.xml_
269
+```xml
270
+<application
271
+      android:name=".MainApplication"
272
++     android:supportsRtl="true"
273
+      ...
274
+      android:theme="@style/AppTheme">
275
+```
276
+
256
 ## Styling the StatusBar
277
 ## Styling the StatusBar
257
 If you set any styles related to the Status Bar, make sure that in Xcode > project > Info.plist, the property `View controller-based status bar appearance` is set to `YES`.
278
 If you set any styles related to the Status Bar, make sure that in Xcode > project > Info.plist, the property `View controller-based status bar appearance` is set to `YES`.
258
 
279