Commit Graph
20 Commits
Author SHA1 Message Date
Benjos Antony a661df1ffc fix(android:scalesPageToFit): scalesPageToFit does not work as intended , especially for large jpg and png images. (#275)
fixes #113

- One can verify that this for jpg images loaded on the webview (eg: https://www.ecda.gov.sg/growatbeanstalk/PublishingImages/READ%20Publications%20and%20Research/Parent%20Infographic%20Series/Infographic%204.jpg)
- This is a replication of the pull request that was originally made in the react-native repo (https://github.com/facebook/react-native/pull/17195), but was not merged in due to no reviews.
2019-02-28 22:02:44 +01:00
Jordan Sexton 92c20581ae feat(toggle scroll bar): added new props showsVerticalScrollIndicator / showsHorizontalScrollIndicator (#250) 2019-02-12 14:47:24 +01:00
Thibault Malbranche d5fc028383 fix(PostMessage): Renamed ReactNativeWebview to ReactNativeWebView
fixes #304
2019-02-01 22:04:11 +01:00
Thibault Malbranche f3bdab5a22 feat(Android/iOS postMessage): refactoring the old postMessage implementation (#303)
fixes #29
fixes #272
fixes #221
fixes #105
fixes #66

BREAKING CHANGE: Communication from webview to react-native has been completely rewritten. React-native-webview will not use or override window.postMessage anymore. Reasons behind these changes can be found throughout so many issues that it made sense to go that way.

Instead of using window.postMessage(data, *), please now use window.ReactNativeWebView.postMessage(data).

Side note: if you wish to keep compatibility with the old version when you upgrade, you can use the injectedJavascript prop to do that:

const injectedJavascript = `(function() {
  window.postMessage = function(data) {
    window.ReactNativeWebView.postMessage(data);
  };
})()`;

Huge thanks to @jordansexton and @KoenLav!
2019-02-01 18:37:28 +01:00
Michael Diarmid 83ce79ff89 feat(iOS/Android): Add cacheEnabled prop (#152)
Added a new cacheEnabled prop to toggle Android & iOS webview caching behavior.

BREAKING CHANGE:  This change makes caching enabled by default when previously there was no caching behavior which may cause unexpected behaviour changes in your existing implementations.
2019-01-30 10:32:46 +01:00
Marcin Ochyra 15d904f769 fix(android): Fix Download on android P (#273)
Fixes #266. 
Now downloading works on Motorola Moto One with Android 9.
2019-01-29 10:05:25 +01:00
Margaret d3fc5e6cde feat(android props): Add androidHardwareAccelerationDisabled prop (#265)
* add test code for disable hardware acceleration

* add interface to disable android hardware acceleration

* Update index.d.ts
2019-01-22 10:21:10 +01:00
Thibault Malbranche 4e1d113c70 fix(android): Blank screen due to missing super() call in RNCWebViewManager.java (#241)
fixes #240 #224
2019-01-11 10:44:42 +01:00
Michael Diarmid 9014c4cac0 fix(android): replace deprecated WebView.PictureListener->onContentSizeChange impl (#164)
* [android] replace deprecated `WebView.PictureListener` onSizeChanged implementation

* [android] use pre-provided w/h values
2019-01-10 11:38:05 +01:00
Scott Mathson 2114a9b327 feat(Android Webview): Add file download support for Android (#203)
Addresses #80.

Caveat: I am not an Android developer. This code comes from a fork of the original RN WebView that we have been using in production for some time, so all credit goes to @Oblongmana: https://github.com/Oblongmana/react-native-webview-file-upload-android.

Setting up a DownloadManager for the WebView is pretty straightforward, as is adding any known cookies to the request. Most of the complication comes from the requirement after SDK 23 to ask the user for the WRITE_EXTERNAL_STORAGE permission. Unfortunately there is no mechanism to suspend the download request until permission is resolved so this code stores off the request and sets up a listener that enqueues the download once permissions are resolved so the user experience is really nice.

I didn't see anything in the way of tests or documentation that needs to be added for this change, so let me know if I missed anything. Thanks!
2019-01-07 15:02:47 +01:00
Thibault Malbranche b1b662628e feat(Android Webview): Support onShouldStartLoadWithRequest on Android (#107)
This PR adds support for `onShouldStartLoadWithRequest` on android.

The initial PR was #59

The issue for this PR is: #106

fixes #106
2018-11-30 02:59:12 +01:00
Andrei Pfeiffer 752a5b295a feat(Android): Support Android file upload (#60)
Fixes #33 

I could really use some help from an Android developer on this one, because I just "made it work", don't know how to "make it work good".

Some things that should be reviewed:

- [ ] validate Android 5.0 devices (my emulator work, but outputs some weird sounds; a Galaxy 4 I tested on crashes)
- [ ] validate Android 5.1 devices (emulator works, couldn't find a real device)
- [ ] how to handle File Extensions? (https://www.w3schools.com/tags/att_input_accept.asp)

I'm sure that there's more refactoring to be done, so any help and advice would be appreciated.
2018-11-21 11:46:43 +01:00
Thibault Malbranche fd736cf26b refactor(Android): New project setup + kotlin events (#121) 2018-11-19 11:25:28 +01:00
Thibault Malbranche 2c0059ff61 feat(New Webview Prop): Added Android overscroll property (#54) 2018-10-17 16:48:19 +02:00
黎明 b5aaf5c800 feat(webview props) onLoadProgresss property (#53)
* Added the onLoadProgress property to the iOS wkwebview and Android webview
2018-10-17 15:08:52 +02:00
Thibault Malbranche 0e34982477 Done 2018-10-13 00:40:20 +02:00
Gianfrancø Palumbo 513886775c Fix Android WebView with garbled UTF-8 characters
taken from the last line of https://stackoverflow.com/a/10831462/728287
2018-10-09 12:14:28 +03:00
Thibault Malbranche fcc35cec09 Renamed RNC on android too to stay consistent with iOS 2018-09-19 01:19:06 +02:00
Jamon Holmgren 642620dd98 WIP: WebView extraction - Rename android from RNC to RCT 2018-09-08 17:01:05 -07:00
Jamon Holmgren f9b9d3c092 Rename ReactWebView to RNCWebView, remove more infinitered references 2018-08-15 20:30:06 -07:00