mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Merge pull request #2 from huningxin/pluggable_webview
Pluggable webview
This commit is contained in:
commit
a09255b2ff
@ -29,6 +29,8 @@
|
||||
/>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
|
||||
<application android:icon="@drawable/icon" android:label="@string/app_name"
|
||||
android:hardwareAccelerated="true">
|
||||
|
@ -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