The following XML implementation seems to work fine:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<WebView
android:id="@+id/chatView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" />
<EditText
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</EditText>
</LinearLayout>
However, the following Java implementation doesn’t (there’s a tiny space at the bottom after the WebView, but the TextView isn’t visible.)
Context mContext = getActivity();
LinearLayout view = new LinearLayout(mContext);
view.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
view.setOrientation(LinearLayout.VERTICAL);
WebView web (new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 1f));
web.loadUrl("http://www.google.com");
TextView text = new TextView(mContext);
text.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
view.addView(web);
view.addView(text);
Example:

TextView should be where the black space at the bottom is, but taller of course. Any help would be very appreciated, thanks.
If you’re trying to make the
WebViewresize around theTextView(I’m assuming this is what you want since you have theandroid:weightproperty), make sure that you set the height to “0dp” instead of “fill_parent“. Otherwise, theWebViewWILL fill the parent and yourTextViewwon’t be displayed.In addition, since the
TextView‘s height is set to “wrap_content,” you actually need content there if you want to see it. See if it shows up once you set the text.