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
4a67dd2e28
commit
8408da55ea
@ -1078,4 +1078,8 @@ public class AndroidWebView extends WebView implements CordovaWebView {
|
||||
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
|
||||
this.appView.setVisibility(View.INVISIBLE);
|
||||
this.root.addView((View) this.appView);
|
||||
this.root.addView((View) this.appView.getView());
|
||||
setContentView(this.root);
|
||||
|
||||
// Clear cancel flag
|
||||
|
@ -17,6 +17,8 @@ public interface CordovaWebView {
|
||||
Object pluginManager = null;
|
||||
Object jsMessageQueue = null;
|
||||
|
||||
View getView();
|
||||
|
||||
void setWebViewClient(CordovaWebViewClient webViewClient);
|
||||
|
||||
void setWebChromeClient(CordovaChromeClient webChromeClient);
|
||||
|
Loading…
Reference in New Issue
Block a user