当前位置:编程学习 > wap >>

我想在列表上方添加一个编辑框或个按钮?该怎么布局

我的列表xml如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
<ImageView 
    android:id="@+id/img"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    />
<LinearLayout 
    android:orientation="vertical"
     android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    >
    <TextView android:id="@+id/title"
         android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#FFFFFFFF"
    android:textSize="22dp"
        />
    <TextView android:id="@+id/info"
         android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#FFFFFFFF"
    android:textSize="13dp"
        />
</LinearLayout>
<LinearLayout 
    android:id="@+id/btn_layout"
    android:orientation="horizontal"
     android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    >
<Button 
    android:id="@+id/vbtn"
     android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/str_vbtn"
   
    />
<Button 
    android:id="@+id/taskskip"
     android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Skip"
    />
</LinearLayout>
</LinearLayout>

应该怎么修改?
上面是列表每项的内容
我想在列表上方再加个编辑框或搜索框和按钮? --------------------编程问答-------------------- 楼主要的可是listview的 footview  参考
http://www.gsdtarena.com/Android/android_tx5.html --------------------编程问答-------------------- 楼主发图片吧,这样太纠结 --------------------编程问答--------------------
引用 2 楼 peijiangping1989 的回复:
楼主发图片吧,这样太纠结

好的~~我见到别人写的是用relatelayout.
可我不知道怎么运用把它和我的listview关联起来.
现在补充下图先
继续求指点 --------------------编程问答-------------------- 郁闷~~编辑不了我的帖子??蛋疼..
回复也插不了东西 --------------------编程问答-------------------- 上不了图~~
在解释下我要说的吧=.-!!
就比如有个
搜索框和listview(listview是我上面xml的布局),
我希望搜索框和listview垂直分布,
但现在只能显示listview,不知道该怎么添搜索框上去显示!!
表达水平有限....就这样 --------------------编程问答-------------------- 将listview的 wieght=1,并且layout_height="fill_parent",其他控件layout_height="wrap_content"
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,