@Bind(R.id.web_container)
FrameLayout mContainer;
private WebView mWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_html);
ButterKnife.bind(this);
mWebView = new WebView(this);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
mWebView.setLayoutParams(lp);
mContainer.addView(mWebView, 0);
}
@Override
protected void onDestroy() {
super.onDestroy();
mContainer.removeAllViews();
mWebView.removeAllViews();
mWebView.destroy();
mWebView = null;
}