I am writing an Android app to display a forum.
The content of the main article is in a WebView
, and I'd like to put the answers into a ListView
under the main article.
<?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:background="@drawable/bg"
android:orientation="vertical" >
<WebView
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
//android:layout_weight="1.0"
android:background="@drawable/bg"
android:cacheColorHint="#00000000"
android:textColor="#FFDEC2" />
<ListView
android:id="@+id/contentlist"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
Here the ListView
isn't displayed at all. If I enable
android:layout_weight="1.0"
the screen gets split, both are shown, but the ListView
should be under the WebView
, so that there is just one scrollbar for both.
I think this article: Android layout - listview and edittext below is about my problem, but I don't understand how to edit the code of this site to fit to my problem.
Can anyone help me please?