Sri*_*vas 8 android listview header
我有一个列表视图,我将headerview添加到该列表.每件事情都很好,但是当滚动列表headerview也随着列表一起移动,所以我想避免headerview滚动,我的意思是我必须滚动列表当我列表到达topview(标题栏)时,headerview必须保持标题栏的底部.
任何人都可以为此提供解决方案吗?
kgi*_*kis 16
而不是标题使用以下布局:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
--> Your header layout here
</LinearLayout>
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
需要注意的重要事项:
@android:id/list为了能够使用ListActivity| 归档时间: |
|
| 查看次数: |
14404 次 |
| 最近记录: |