forked from github/cordova-android
Add getView() API into CordovaWebView.
This API is to get the actual View. The concrete webview implementation can use compositing instead of extending underlying webview.
This commit is contained in:
parent
09ac30ef2e
commit
9d1c72cc07
@ -1078,4 +1078,8 @@ public class AndroidWebView extends WebView implements CordovaWebView {
|
|||||||
super.setLayoutParams(layoutParams);
|
super.setLayoutParams(layoutParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -315,7 +315,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
|
|
||||||
// Add web view but make it invisible while loading URL
|
// Add web view but make it invisible while loading URL
|
||||||
this.appView.setVisibility(View.INVISIBLE);
|
this.appView.setVisibility(View.INVISIBLE);
|
||||||
this.root.addView((View) this.appView);
|
this.root.addView((View) this.appView.getView());
|
||||||
setContentView(this.root);
|
setContentView(this.root);
|
||||||
|
|
||||||
// Clear cancel flag
|
// Clear cancel flag
|
||||||
|
@ -17,6 +17,8 @@ public interface CordovaWebView {
|
|||||||
Object pluginManager = null;
|
Object pluginManager = null;
|
||||||
Object jsMessageQueue = null;
|
Object jsMessageQueue = null;
|
||||||
|
|
||||||
|
View getView();
|
||||||
|
|
||||||
void setWebViewClient(CordovaWebViewClient webViewClient);
|
void setWebViewClient(CordovaWebViewClient webViewClient);
|
||||||
|
|
||||||
void setWebChromeClient(CordovaChromeClient webChromeClient);
|
void setWebChromeClient(CordovaChromeClient webChromeClient);
|
||||||
|
Loading…
Reference in New Issue
Block a user