Skip to content

Commit

Permalink
CB-8828 Delete onScrollChanged event
Browse files Browse the repository at this point in the history
  • Loading branch information
agrieve committed Apr 9, 2015
1 parent 0f73884 commit 4595403
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 84 deletions.
7 changes: 5 additions & 2 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ Changes For Plugin Developers:
* Android Studio is now fully supported, and recommended over Eclipse
* Build using Gradle
* All builds [use Gradle by default](Android%20Shell%20Tool%20Guide_building_with_gradle), instead of Ant
* Plugins can add their own gradle build steps!
* Plugins can depend on Maven libraries using `<framework>` tags
* New APIs: `onStart`, `onStop`, `onConfigurationChanged`
* `"onScrollChanged"` message removed. Use `view.getViewTreeObserver().addOnScrollChangedListener(...)` instead
* CB-8702 New API for plugins to override `shouldInterceptRequest` with a stream

#### Other Changes ####
* CB-8378 Removed `hidekeyboard` and `showkeyboard` events (apps should use a plugin instead)
* CB-7085 Add `onConfigurationChanged` hook for plugins
* CB-8735 `bin/create` regex relaxed / better support for numbers
* CB-8702 Add API for plugins to override `shouldInterceptRequest` with a stream
* CB-8699 Fix CordovaResourceApi `copyResource` creating zero-length files when src=uncompressed asset
* CB-8693 CordovaLib should not contain icons / splashscreens
* CB-8592 Fix NPE if lifecycle events reach CordovaWebView before `init()` has been called
Expand Down
4 changes: 0 additions & 4 deletions framework/src/org/apache/cordova/CordovaActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
* @return Object or null
*/
public Object onMessage(String id, Object data) {
if (!"onScrollChanged".equals(id)) {
LOG.d(TAG, "onMessage(" + id + "," + data + ")");
}

if ("onReceivedError".equals(id)) {
JSONObject d = (JSONObject) data;
try {
Expand Down
65 changes: 0 additions & 65 deletions framework/src/org/apache/cordova/ScrollEvent.java

This file was deleted.

13 changes: 0 additions & 13 deletions framework/src/org/apache/cordova/engine/SystemWebView.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.apache.cordova.CordovaInterface;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CordovaWebViewEngine;
import org.apache.cordova.ScrollEvent;

/**
* Custom WebView subclass that enables us to capture events needed for Cordova.
Expand Down Expand Up @@ -59,18 +58,6 @@ public void setWebChromeClient(WebChromeClient client) {
super.setWebChromeClient(client);
}

@Override
public void onScrollChanged(int l, int t, int oldl, int oldt)
{
// TODO: scrolling is perf-sensitive, so we'd be better to not use postMessage
// here, and also not create any new objects. Instead, plugins should use:
// webView.getView().getViewTreeObserver().addOnScrollChangedListener(...)
if (parentEngine != null && parentEngine.pluginManager != null) {
ScrollEvent myEvent = new ScrollEvent(l, t, oldl, oldt, this);
parentEngine.pluginManager.postMessage("onScrollChanged", myEvent);
}
}

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
Boolean ret = parentEngine.client.onDispatchKeyEvent(event);
Expand Down

0 comments on commit 4595403

Please sign in to comment.