Skip to content

Commit 408a991

Browse files
Add documentation for Android Support
1 parent e03d23c commit 408a991

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,28 @@ You can register to `ScrollViewResponder` events `onKeyboardWillShow` and `onKey
9191
</KeyboardAwareScrollView>
9292
```
9393
94+
## Android Support
95+
First, Android natively has this feature, you can easily enable it by setting `windowSoftInputMode` in `AndroidManifest.xml`. Check [here](https://developer.android.com/guide/topics/manifest/activity-element.html#wsoft).
96+
97+
But if you want to use feature like `extraHeight`, you need to enable Android Support with the following steps:
98+
99+
- Make sure you are using react-native `0.46` or above.
100+
- Set `windowSoftInputMode` to `adjustPan` in `AndroidManifest.xml`.
101+
- Set `enableOnAndroid` property to `true`.
102+
103+
Android Suppor is not perfect, here is the support list:
104+
105+
| **Prop** | **Android Support** |
106+
|----------|-----------------|
107+
| `viewIsInsideTabBar` | Yes |
108+
| `resetScrollToCoords` | Yes |
109+
| `enableAutoAutomaticScroll` | Yes |
110+
| `extraHeight` | Yes |
111+
| `extraScrollHeight` | Yes |
112+
| `enableResetScrollToCoords` | Yes |
113+
| `keyboardOpeningTime` | No |
114+
115+
94116
## API
95117
### Props
96118
All the `ScrollView`/`ListView` props will be passed.
@@ -104,6 +126,7 @@ All the `ScrollView`/`ListView` props will be passed.
104126
| `extraScrollHeight` | `number` | Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard. |
105127
| `enableResetScrollToCoords` | `boolean` | Lets the user enable or disable automatic resetScrollToCoords. |
106128
| `keyboardOpeningTime` | `number` | Sets the delay time before scrolling to new position, default is 250 |
129+
| `enableOnAndroid` | `boolean` | Enable Android Support |
107130
108131
| **Method** | **Parameter** | **Description** |
109132
|------------|---------------|-----------------|

0 commit comments

Comments
 (0)