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();