我已經嘗試了各種解決方案在這裏問stackoverflow爲同樣的問題,但沒有任何工作對我來說。我想在兩個列表視圖下顯示兩個文本視圖。我的代碼是這樣的TextView在兩個列表視圖下
<LinearLayout
....>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:weightSum="2" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2" >
<ListView
android:id="@+id/lv1InBS"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</ListView>
<ListView
android:id="@+id/lv2InBS"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</ListView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:text="TextView"
android:textColor="#800000"
android:typeface="serif" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:text="TextView"
android:textColor="#800000"
android:typeface="serif" />
</LinearLayout>
</LinearLayout>
....
請幫助。我一直在努力糾正它。 謝謝。
請解釋究竟是如何做你想讓它看起來像 – 2013-02-17 10:51:03
我想我的兩個textviews固定的,而我可以通過我的列表視圖 – user1984849 2013-02-17 10:52:52
滾動基本上有這些文本視圖某種共有。所以,我希望用戶可以滾動瀏覽各種交易,而總是出現在屏幕上。 – user1984849 2013-02-17 10:54:33