level 1
阿青08
楼主

为什么搜索框会在ListView中重复出现,而Textview里的【编号,品牌,型号】不会;代码如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
android:orientation="vertical"
android:id="@+id/page2"
android:paddingTop="@dimen/activity_vertical_margin" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp" >
<EditText
android:id="@+id/page2_query_edit"
style="@style/page1_text"
android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/page2_query_input"
android:hint="@string/page2_login_query_hint"
android:paddingBottom="8dp"
android:paddingLeft="36dp"
android:paddingRight="80dp"
android:paddingTop="8dp"
android:saveEnabled="true"
android:singleLine="true" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/page2_query_edit"
android:layout_alignRight="@+id/page2_query_edit"
android:layout_marginRight="16dp"
android:background="@drawable/page2_query_button" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="30dp" >
<TextView
android:id="@+id/id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:layout_weight="1"
android:text="编号"
android:textSize="15sp" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:layout_weight="1"
android:text="品牌"
android:textSize="15sp" />
<TextView
android:id="@+id/model"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:layout_weight="1"
android:text="型号"
android:textSize="15sp" />
</LinearLayout>
<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" >
</ListView>
</LinearLayout>