关关于ListView使用! 我现在用listview显示数据 我再java代码里给listview用addHeaderView(view v)方法设置了页眉 但是在显示的时候确实显示在第一行 但是当数据过多我往下滚动时添加的的页眉也跟着滚动了!请问怎样能设置成不滚动的啊?有什么方法让第一行不滚动吗!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以在listview控件的上面再放控件用于显示你的页眉! 你用addHeaderView(view v)方法设置了页眉,当然滚动的时候就会跟着滚动。这是一定的你要想不滚动的话,按下面的界面改<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <!-- 不动的页眉 --> <TextView android:id="@+id/lab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="不动的页眉" /> <ListView android:id="@+id/lv" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@id/lab" ></ListView></RelativeLayout> android中如何获取草稿箱中收件人的address android Spinner 问题,初级的!!!!! libcurl编译 Android技术讨论Q群 eclipes里Android相关代码提示无效 请教有没有必要继续学习 关于安卓的问题 百度影棒连接Wifi后又产生一个AP,是怎么实现的? 修改Launcher启动后图标显示为低分辨率问题 黄色三角形怎么回? 模拟器死掉 如何想android的模拟器中加入mp3和MP4呢
你要想不滚动的话,按下面的界面改<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<!-- 不动的页眉 -->
<TextView android:id="@+id/lab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不动的页眉" />
<ListView android:id="@+id/lv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/lab"
></ListView>
</RelativeLayout>