private void init(MainView v, Object params) { Context ctx = RhodesActivity.getContext(); view = new MyView(ctx); view.setOrientation(LinearLayout.VERTICAL); view.setGravity(Gravity.BOTTOM); view.setLayoutParams(new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT)); webView = null; if (v != null) webView = v.detachWebView(); if (webView == null) webView = RhodesActivity.safeGetInstance().createWebView(); view.addView(webView, new LinearLayout.LayoutParams(FILL_PARENT, 0, 1)); LinearLayout bottom = new LinearLayout(ctx); bottom.setOrientation(LinearLayout.HORIZONTAL); bottom.setBackgroundColor(Color.GRAY); bottom.setLayoutParams(new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0)); view.addView(bottom); toolBar = bottom; setupToolbar(toolBar, params); webView.requestFocus(); }