forked from react-native-webview/react-native-webview
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'shirakaba/animated-support' into shirakaba/animated-sup…
…port-fabric * shirakaba/animated-support: chore(release): 8.0.6 [skip ci] fix(Android): Revert "Redirected URLs now redirect correctly. (react-native-webview#991)" (react-native-webview#1177) chore(release): 8.0.5 [skip ci] fix(Android): Redirected URLs now redirect correctly. (react-native-webview#991) chore(example): Added three test examples: Alerts, Scrolling, and Background. chore(release): 8.0.4 [skip ci] fix(iOS): Meta method 'UIScrollViewContentInsetAdjustmentBehavior:' conflict warning chore(example): Added example app chore(iOS): Extract wkWebViewConfig setup to setUpWkWebViewConfig function chore(release): 8.0.3 [skip ci] fix(whitelisted origins): Prevent handling of un-whitelisted URLs chore(README): Lean Core badge
- Loading branch information
Showing
67 changed files
with
3,898 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pbxproj -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
project.xcworkspace | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
|
||
# Visual Studio Code | ||
# | ||
.vscode/ | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
!debug.keystore | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/ | ||
|
||
*/fastlane/report.xml | ||
*/fastlane/Preview.html | ||
*/fastlane/screenshots | ||
|
||
# Bundle artifact | ||
*.jsbundle | ||
|
||
# CocoaPods | ||
/ios/Pods/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
bracketSpacing: false, | ||
jsxBracketSameLine: true, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
import React, {Component} from 'react'; | ||
import { | ||
StyleSheet, | ||
SafeAreaView, | ||
Text, | ||
TouchableOpacity, | ||
View, | ||
Keyboard, | ||
Button, | ||
} from 'react-native'; | ||
|
||
import Alerts from './examples/Alerts'; | ||
import Scrolling from './examples/Scrolling'; | ||
import Background from './examples/Background'; | ||
|
||
const TESTS = { | ||
Alerts: { | ||
title: 'Alerts', | ||
testId: 'alerts', | ||
description: 'Alerts tests', | ||
render() { | ||
return <Alerts />; | ||
}, | ||
}, | ||
Scrolling: { | ||
title: 'Scrolling', | ||
testId: 'scrolling', | ||
description: 'Scrolling event test', | ||
render() { | ||
return <Scrolling />; | ||
}, | ||
}, | ||
Background: { | ||
title: 'Background', | ||
testId: 'background', | ||
description: 'Background color test', | ||
render() { | ||
return <Background />; | ||
}, | ||
}, | ||
}; | ||
|
||
type Props = {}; | ||
type State = {restarting: boolean, currentTest: Object}; | ||
|
||
export default class App extends Component<Props, State> { | ||
state = { | ||
restarting: false, | ||
currentTest: TESTS.Alerts, | ||
}; | ||
|
||
_simulateRestart = () => { | ||
this.setState({restarting: true}, () => this.setState({restarting: false})); | ||
}; | ||
|
||
_changeTest = testName => { | ||
this.setState({currentTest: TESTS[testName]}); | ||
}; | ||
|
||
render() { | ||
const {restarting, currentTest} = this.state; | ||
return ( | ||
<SafeAreaView style={styles.container}> | ||
<TouchableOpacity | ||
style={styles.closeKeyboardView} | ||
onPress={() => Keyboard.dismiss()} | ||
testID="closeKeyboard" | ||
/> | ||
|
||
<TouchableOpacity | ||
testID="restart_button" | ||
onPress={this._simulateRestart} | ||
style={styles.restartButton} | ||
activeOpacity={0.6}> | ||
<Text>Simulate Restart</Text> | ||
</TouchableOpacity> | ||
|
||
<View style={styles.testPickerContainer}> | ||
<Button | ||
testID="testType_alerts" | ||
title="Alerts" | ||
onPress={() => this._changeTest('Alerts')} | ||
/> | ||
<Button | ||
testID="testType_scrolling" | ||
title="Scrolling" | ||
onPress={() => this._changeTest('Scrolling')} | ||
/> | ||
<Button | ||
testID="testType_background" | ||
title="Background" | ||
onPress={() => this._changeTest('Background')} | ||
/> | ||
</View> | ||
|
||
{restarting ? null : ( | ||
<View | ||
testID={`example-${currentTest.testId}`} | ||
key={currentTest.title} | ||
style={styles.exampleContainer}> | ||
<Text style={styles.exampleTitle}>{currentTest.title}</Text> | ||
<Text style={styles.exampleDescription}> | ||
{currentTest.description} | ||
</Text> | ||
<View style={styles.exampleInnerContainer}> | ||
{currentTest.render()} | ||
</View> | ||
</View> | ||
)} | ||
</SafeAreaView> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#F5FCFF', | ||
padding: 8, | ||
}, | ||
exampleContainer: { | ||
padding: 16, | ||
backgroundColor: '#FFF', | ||
borderColor: '#EEE', | ||
borderTopWidth: 1, | ||
borderBottomWidth: 1, | ||
flex: 1, | ||
}, | ||
exampleTitle: { | ||
fontSize: 18, | ||
}, | ||
exampleDescription: { | ||
color: '#333333', | ||
marginBottom: 16, | ||
}, | ||
exampleInnerContainer: { | ||
borderColor: '#EEE', | ||
borderTopWidth: 1, | ||
paddingTop: 10, | ||
flex: 1, | ||
}, | ||
restartButton: { | ||
padding: 6, | ||
fontSize: 16, | ||
borderRadius: 5, | ||
backgroundColor: '#F3F3F3', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
alignSelf: 'flex-end', | ||
}, | ||
closeKeyboardView: { | ||
width: 5, | ||
height: 5, | ||
}, | ||
testPickerContainer: { | ||
flexDirection: 'row', | ||
flexWrap: 'wrap', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# To learn about Buck see [Docs](https://buckbuild.com/). | ||
# To run your application with Buck: | ||
# - install Buck | ||
# - `npm start` - to start the packager | ||
# - `cd android` | ||
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` | ||
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck | ||
# - `buck install -r android/app` - compile, install and run application | ||
# | ||
|
||
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") | ||
|
||
lib_deps = [] | ||
|
||
create_aar_targets(glob(["libs/*.aar"])) | ||
|
||
create_jar_targets(glob(["libs/*.jar"])) | ||
|
||
android_library( | ||
name = "all-libs", | ||
exported_deps = lib_deps, | ||
) | ||
|
||
android_library( | ||
name = "app-code", | ||
srcs = glob([ | ||
"src/main/java/**/*.java", | ||
]), | ||
deps = [ | ||
":all-libs", | ||
":build_config", | ||
":res", | ||
], | ||
) | ||
|
||
android_build_config( | ||
name = "build_config", | ||
package = "com.example", | ||
) | ||
|
||
android_resource( | ||
name = "res", | ||
package = "com.example", | ||
res = "src/main/res", | ||
) | ||
|
||
android_binary( | ||
name = "app", | ||
keystore = "//android/keystores:debug", | ||
manifest = "src/main/AndroidManifest.xml", | ||
package_type = "debug", | ||
deps = [ | ||
":app-code", | ||
], | ||
) |
Oops, something went wrong.