From 2e56ba3d93fd07bb9c1036ed0508232503f6f08c Mon Sep 17 00:00:00 2001 From: Nipher Date: Wed, 29 Apr 2015 09:28:54 -0300 Subject: [PATCH] Cordova 5.0 --- src/android/plugin/google/maps/GoogleMaps.java | 2 +- src/android/plugin/google/maps/MyPluginLayout.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/plugin/google/maps/GoogleMaps.java b/src/android/plugin/google/maps/GoogleMaps.java index 0d62cb6e2..189a0a3df 100644 --- a/src/android/plugin/google/maps/GoogleMaps.java +++ b/src/android/plugin/google/maps/GoogleMaps.java @@ -135,7 +135,7 @@ public void initialize(final CordovaInterface cordova, final CordovaWebView webV super.initialize(cordova, webView); activity = cordova.getActivity(); density = Resources.getSystem().getDisplayMetrics().density; - root = (ViewGroup) webView.getParent(); + root = (ViewGroup) webView.getView().getParent(); // Is this release build version? boolean isRelease = false; diff --git a/src/android/plugin/google/maps/MyPluginLayout.java b/src/android/plugin/google/maps/MyPluginLayout.java index cdb468104..a20425749 100644 --- a/src/android/plugin/google/maps/MyPluginLayout.java +++ b/src/android/plugin/google/maps/MyPluginLayout.java @@ -50,7 +50,7 @@ public MyPluginLayout(CordovaWebView webView, Activity activity) { super(webView.getContext()); mActivity = activity; this.webView = webView; - this.root = (ViewGroup) webView.getParent(); + this.root = (ViewGroup) webView.getView().getParent(); this.context = webView.getContext(); webView.getView().setBackgroundColor(Color.TRANSPARENT); if (VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { @@ -258,7 +258,7 @@ public FrontLayerLayout(Context context) { @Override public boolean onInterceptTouchEvent(MotionEvent event) { if (isClickable == false || myView == null || myView.getVisibility() != View.VISIBLE) { - webView.requestFocus(View.FOCUS_DOWN); + webView.getView().requestFocus(View.FOCUS_DOWN); return false; } int x = (int)event.getX();