首先,我已经阅读了其他一些 WebView 问题,但似乎没有一个问题完全相同。
我有 aWebView
和 a FrameLayout
, FrameLayOut 看起来像..
FrameLayout fl = new FrameLayout(this);
EditText qbox = new EditText(this);
box.setText(query);
Button button = new Button(this);
fl.addView(button, 45,45);
fl.addView(box,275,45);
然后我将Webview
and添加FrameLayout
到我的LinearLayout
喜欢中..
LinearLayout ll = new LinearLayout(this);
webview.loadUrl(url);
ll.addView(fl,300,45);
ll.addView(webview, LayoutParams.FILL_PARENT);
但是,这呈现得很奇怪..而不是 FrameLayout 显示在它呈现在页面顶部的 Webview 的“顶部”,Webview 位于右侧(主要是页面外),屏幕的其余部分为黑色。为什么?