Skip to content
This repository was archived by the owner on May 7, 2022. It is now read-only.

Commit ba5264a

Browse files
committed
Add scrollableContainerStyle
1 parent 93ce855 commit ba5264a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3789
-4858
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
project.xcworkspace
2423

2524
# Android/IntelliJ
2625
#
@@ -33,10 +32,6 @@ local.properties
3332
/android/gradlew.bat
3433
/android/gradle/
3534

36-
# Visual Studio Code
37-
#
38-
.vscode/
39-
4035
# node.js
4136
#
4237
node_modules/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Lastly, validate if the content above the accessory view has correct offsets, if
6262

6363
- `renderBackground` (optional) - accepts a function returning React node. This is useful when you want to have a custom node as a background (e.g. `<ImageBackground style={StyleSheet.absoluteFill} />` ). Remember about absolute positioning.
6464

65+
- `scrollableContainerStyle` (optional) - accepts [View Style Props](https://reactnative.dev/docs/view-style-props). Use to style the container wrapping a scrollable component passed in `renderScrollable`. In case you want scrollable to fill the entire container try passing `flex: 1` here.
66+
6567
- `spaceBetweenKeyboardAndAccessoryView` (optional) - accepts a number. Use to adjust space between the accessory view and the keyboard, when the latter is open. Read more [here](#handling-wrong-offsets).
6668

6769
- `useListenersOnAndroid` (optional) - accepts a boolean. By default, Android OS will resize the window when the keyboard is open and accessory view will automatically be positioned above the keyboard. This behavior can be amended, so if for some reason accessory view doesn't appear on top of the keyboard, try setting this prop, it will calculate the content height based on a keyboard listener. Has no impact on iOS.

example/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

example/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module.exports = {
22
extends: ['@react-native-community', 'plugin:prettier/recommended'],
3-
parser: '@typescript-eslint/parser',
4-
plugins: ['@typescript-eslint', 'simple-import-sort'],
3+
plugins: ['simple-import-sort'],
54
root: true,
65
rules: {
76
'import/order': 'off',

example/.gitattributes

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# specific for windows script files
1+
# Windows files should use crlf line endings
2+
# https://help.github.com/articles/dealing-with-line-endings/
23
*.bat text eol=crlf
3-
4-
*.pbxproj -text

example/.gitignore

100755100644
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
project.xcworkspace
2423

2524
# Android/IntelliJ
2625
#
@@ -30,10 +29,6 @@ build/
3029
local.properties
3130
*.iml
3231

33-
# Visual Studio Code
34-
#
35-
.vscode/
36-
3732
# node.js
3833
#
3934
node_modules/

example/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example
1+
# example
22

33
## Getting Started
44

@@ -23,3 +23,20 @@ or
2323
```bash
2424
yarn android
2525
```
26+
27+
## Updating project
28+
29+
1. Remove current `example` project
30+
2. Create a project named `example` using [react-native-better-template](https://github.com/demchenkoalex/react-native-better-template)
31+
3. Revert `README.md` so you can see this guide
32+
4. In `tsconfig.json` add
33+
34+
```json
35+
"baseUrl": ".",
36+
"paths": {
37+
"@flyerhq/react-native-keyboard-accessory-view": ["../src"]
38+
},
39+
```
40+
41+
5. Check the difference in `metro.config.js` and combine all
42+
6. Revert `App.tsx`

example/android/app/_BUCK

100755100644
File mode changed.

example/android/app/build.gradle

100755100644
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
122122
def enableHermes = project.ext.react.get('enableHermes', false);
123123

124124
android {
125+
ndkVersion rootProject.ext.ndkVersion
126+
125127
compileSdkVersion rootProject.ext.compileSdkVersion
126128

127129
compileOptions {
@@ -170,18 +172,20 @@ android {
170172
variant.outputs.each { output ->
171173
// For each separate APK per architecture, set a unique version code as described here:
172174
// https://developer.android.com/studio/build/configure-apk-splits.html
175+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
173176
def versionCodes = ['armeabi-v7a': 1, 'x86': 2, 'arm64-v8a': 3, 'x86_64': 4]
174177
def abi = output.getFilter(OutputFile.ABI)
175178
if (abi != null) { // null for the universal-debug, universal-release variants
176179
output.versionCodeOverride =
177-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
180+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
178181
}
179182

180183
}
181184
}
182185
}
183186

184187
dependencies {
188+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
185189
implementation fileTree(dir: 'libs', include: ['*.jar'])
186190
//noinspection GradleDynamicVersion
187191
implementation 'com.facebook.react:react-native:+' // From node_modules

0 commit comments

Comments
 (0)