【发布时间】:2013-04-18 16:05:52
【问题描述】:
我有一个列表视图,但在开始时我想放置一段文本,以帮助用户了解该列表的目的不是什么。之后我想显示列表并且我想是可滚动的。卷轴我知道怎么做,但文本部分没有。我尝试制作两种布局,一种用于文本,另一种用于列表,但我的 xml 立即变得充满错误。
这是我的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 的文本