我的应用程序中的 WebView 显示为窗口,但我希望它是全屏的!这是屏幕截图:
以下是我的代码:
![not fullscreen](https://istack.dev59.com/XgW0R.webp)
public class DockViewerActivity extends Activity {
private WebView mWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mWebView = new WebView(this);
setContentView(mWebView);
mWebView.loadUrl("file:///android_asset/1.html");
Toast.makeText(this, getString(R.string.loading), Toast.LENGTH_LONG).show();
}
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
- M D