0
我有一個列表視圖,但在開始我想放置一段文字,這將有助於用戶瞭解該列表的目的是什麼。之後,我想顯示列表,我想要可以滾動。滾動我知道如何去做,但文字部分沒有。我試過做兩個佈局,一個用於文本,另一個用於列表,但是我的xml立即變成填充錯誤。如何在android中的列表視圖之前添加說明文字?
這是我的XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/legislatie1"
android:orientation="vertical" >
<ListView
android:id="@+id/listView1"
android:layout_width="wrap_content"
android:layout_height="600dp"
android:layout_alignParentRight="true"
android:drawSelectorOnTop="true"
android:textSize="10pt" >
</ListView>
</RelativeLayout>
在列表視圖上方放置一個textview。更新文本視圖 – Raghunandan
它的工作,thx! – user2152480